[web] Don't collect trace info in the color grid benchmark (#54396)

This commit is contained in:
Mouad Debbar 2020-04-10 13:30:15 -07:00 committed by GitHub
parent bb02f40ca8
commit b0610be3b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -215,6 +215,16 @@ class BenchBuildColorsGrid extends WidgetBuildRecorder {
BenchBuildColorsGrid.canvasKit()
: mode = _TestMode.useCanvasKit, super(name: canvasKitBenchmarkName);
/// Disables tracing for this benchmark.
///
/// When tracing is enabled, DOM layout takes longer to complete. This has a
/// significant effect on the benchmark since we do a lot of text layout
/// operations that trigger synchronous DOM layout.
///
/// Tracing has a negative effect only in [_TestMode.useDomTextLayout] mode.
@override
bool get isTracingEnabled => false;
static const String domBenchmarkName = 'text_dom_color_grid';
static const String canvasBenchmarkName = 'text_canvas_color_grid';
static const String canvasKitBenchmarkName = 'text_canvas_kit_color_grid';