Skip to content

Commit ed3af5f

Browse files
goderbauertbosch
authored andcommitted
fix(benchpress): do not throw on unkown frame timestamp event
Closes angular#2622
1 parent 5beaf6d commit ed3af5f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

modules/benchpress/src/webdriver/chrome_driver_extension.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,13 @@ export class ChromeDriverExtension extends WebDriverExtension {
111111
}
112112

113113
} else if (StringWrapper.equals(cat, 'benchmark')) {
114+
// TODO(goderbauer): Instead of BenchmarkInstrumentation::ImplThreadRenderingStats the
115+
// following events should be used (if available) for more accurate measurments:
116+
// 1st choice: vsync_before - ground truth on Android
117+
// 2nd choice: BenchmarkInstrumentation::DisplayRenderingStats - available on systems with
118+
// new surfaces framework (not broadly enabled yet)
119+
// 3rd choice: BenchmarkInstrumentation::ImplThreadRenderingStats - fallback event that is
120+
// allways available if something is rendered
114121
if (StringWrapper.equals(name, 'BenchmarkInstrumentation::ImplThreadRenderingStats')) {
115122
var frameCount = event['args']['data']['frame_count'];
116123
if (frameCount > 1) {
@@ -119,13 +126,6 @@ export class ChromeDriverExtension extends WebDriverExtension {
119126
if (frameCount == 1) {
120127
normalizedEvents.push(normalizeEvent(event, {'name': 'frame'}));
121128
}
122-
} else if (StringWrapper.equals(name, 'BenchmarkInstrumentation::DisplayRenderingStats') ||
123-
StringWrapper.equals(name, 'vsync_before')) {
124-
// TODO(goderbauer): If present, these events should be used instead of
125-
// BenchmarkInstrumentation::ImplThreadRenderingStats.
126-
// However, they never seem to appear in practice. Maybe they appear on a different
127-
// platform?
128-
throw new BaseException('NYI');
129129
}
130130
}
131131
});

0 commit comments

Comments
 (0)