fix(benchpress): work around missing events from Chrome 63 (#21396)
Chrome 63 can cause the navigationStart event for the first run to arrive with a different pid than the start of the benchpress run. This makes the first collected result invalid. This workaround causes the sampler to ignore runs that have this condition. PR Close #21396
This commit is contained in:

committed by
Kara Erickson

parent
27196b676b
commit
fa03ae14b0
@ -249,6 +249,9 @@ export class PerflogMetric extends Metric {
|
||||
// not all events have been received, no further processing for now
|
||||
return null;
|
||||
}
|
||||
if (markStartEvent.pid !== markEndEvent.pid) {
|
||||
result['invalid'] = 1;
|
||||
}
|
||||
|
||||
let gcTimeInScript = 0;
|
||||
let renderTimeInScript = 0;
|
||||
|
@ -63,7 +63,12 @@ export class Sampler {
|
||||
}
|
||||
return resultPromise.then((_) => this._driver.waitFor(this._execute))
|
||||
.then((_) => this._metric.endMeasure(this._prepare === Options.NO_PREPARE))
|
||||
.then((measureValues) => this._report(lastState, measureValues));
|
||||
.then((measureValues) => {
|
||||
if (!!measureValues['invalid']) {
|
||||
return lastState;
|
||||
}
|
||||
return this._report(lastState, measureValues);
|
||||
});
|
||||
}
|
||||
|
||||
private _report(state: SampleState, metricValues: {[key: string]: any}): Promise<SampleState> {
|
||||
|
Reference in New Issue
Block a user