angular-cn/packages/benchpress/src
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(bazel): Turning on strictPropertyInitialization for Angular. (#24572) 2018-06-25 07:57:13 -07:00
metric fix(benchpress): work around missing events from Chrome 63 (#21396) 2018-01-08 16:14:34 -08:00
reporter perf: switch angular to use StaticInjector instead of ReflectiveInjector 2017-08-07 15:42:34 -07:00
validator perf: switch angular to use StaticInjector instead of ReflectiveInjector 2017-08-07 15:42:34 -07:00
webdriver fix(benchpress): Use performance.mark() instead of console.time() (#24114) 2018-08-30 21:33:40 -07:00
common_options.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
measure_values.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
metric.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
reporter.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
runner.ts refactor: ensure all 'TODO's are consistent (#23252) 2018-04-13 13:11:01 -07:00
sample_description.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
sampler.ts fix(benchpress): work around missing events from Chrome 63 (#21396) 2018-01-08 16:14:34 -08:00
statistic.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
validator.ts fix(benchpress): Update types for TypeScript nullability support 2017-04-12 11:36:19 -07:00
web_driver_adapter.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
web_driver_extension.ts fix(benchpress): Update types for TypeScript nullability support 2017-04-12 11:36:19 -07:00