From 5960d4c51372c16fa72eb4f620e2d9c2314b206a Mon Sep 17 00:00:00 2001 From: wagnermaciel Date: Fri, 14 May 2021 06:45:27 -0700 Subject: [PATCH] docs(benchpress): reword a comment (#42096) * this is a follow up on pr #42085 to change the wording of the comment explaining the fix. PR Close #42096 --- packages/benchpress/src/metric/perflog_metric.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/benchpress/src/metric/perflog_metric.ts b/packages/benchpress/src/metric/perflog_metric.ts index cf22d63905..d68acdff45 100644 --- a/packages/benchpress/src/metric/perflog_metric.ts +++ b/packages/benchpress/src/metric/perflog_metric.ts @@ -243,11 +243,12 @@ export class PerflogMetric extends Metric { // testing (this is triggered by us calling #timeBegin and #timeEnd). // // Previously, this was done by checking that the event name matched our mark name and that - // the phase was either "B" or "E" ("begin" or "end"). However, for some reason now this is + // the phase was either "B" or "E" ("begin" or "end"). However, since Chrome v90 this is // showing up as "-bpstart" and "-bpend" ("benchpress start/end"), which is what one would // actually expect since that is the mark name used in ChromeDriverExtension - see the - // #timeBegin and #timeEnd implementations in chrome_driver_extension.ts. We are not sure why - // the markName didn't show up with the "-bp(start/end)" suffix before. + // #timeBegin and #timeEnd implementations in chrome_driver_extension.ts. For + // backwards-compatibility with Chrome v89 (and older), we do both checks: the phase-based + // one ("B" or "E") and event name-based (the "-bp(start/end)" suffix). const isStartEvent = (ph === 'B' && name === markName) || name === markName + '-bpstart'; const isEndEvent = (ph === 'E' && name === markName) || name === markName + '-bpend'; if (isStartEvent) {