angular-cn/packages/benchpress/test
Mike Giambalvo 06d04002fd fix(benchpress): Use performance.mark() instead of console.time() (#24114)
Previously, benchpress would use `console.time()` and
`console.timeEnd()` to measure the start and end of a test in the
performance log. This used to work over navigations - if you called
`console.time(id)` then navigated to a different page, calling
`console.timeEnd(id)` would still insert an event in the performance
log.

As of Chrome 65, this is no longer the case. `console.timeEnd(id)` will
simply not insert an event in the performance log unless
`console.time(id)` was called on the same page. Likewise, using
`performance.measure()` does not work if the starting mark was on a
different page.

This simple workaround uses `performance.mark()` to insert events in the
performance log at the start and end of the test. Benchpress looks for
'-bpstart' and '-bpend' in the name of the performance mark, and
normalizes that to the start and end events expected by PerflogMetric

PR Close #24114
2018-08-30 21:33:40 -07:00
..
firefox_extension build: remove `main()` from specs (#21053) 2017-12-22 13:10:51 -08:00
metric build: upgrade jasmine (and related typings) to latest version (#19904) 2018-07-06 13:48:02 -07:00
reporter feat: add TypeScript 3 support (#25275) 2018-08-27 21:07:53 -04:00
validator build: remove `main()` from specs (#21053) 2017-12-22 13:10:51 -08:00
webdriver fix(benchpress): Use performance.mark() instead of console.time() (#24114) 2018-08-30 21:33:40 -07:00
runner_spec.ts build: remove `main()` from specs (#21053) 2017-12-22 13:10:51 -08:00
sampler_spec.ts build: remove `main()` from specs (#21053) 2017-12-22 13:10:51 -08:00
statistic_spec.ts build: remove `main()` from specs (#21053) 2017-12-22 13:10:51 -08:00
trace_event_factory.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
web_driver_extension_spec.ts build: add bazel test rules for remainder of packages (#21053) 2017-12-22 13:10:51 -08:00