diff --git a/packages/devtools_app/benchmark/devtools_benchmarks_test.dart b/packages/devtools_app/benchmark/devtools_benchmarks_test.dart index 6b64940f19b..7c3699089f6 100644 --- a/packages/devtools_app/benchmark/devtools_benchmarks_test.dart +++ b/packages/devtools_app/benchmark/devtools_benchmarks_test.dart @@ -185,6 +185,7 @@ void _verifyScoresAgainstThresholds( final scoreName = _generateScoreName(metric, computation); final score = scoresAsMap[scoreName]!.value; final threshold = expectedThresholds[scoreName]!; + stdout.writeln(' $scoreName: $score μs (threshold: $threshold μs)'); if (score > threshold) { _exceededThresholds.writeln( exceededThresholdLine( @@ -199,9 +200,17 @@ void _verifyScoresAgainstThresholds( } const _frameTimeFor60FPSInMicros = 16666.6; -// const _frameTimeFor30FPSInMicros = 33333.3; +// 1.5x the 60 FPS frame budget (~25 ms / 40 FPS) for total_time.p90 on the +// heavier offline screens. +const _relaxedP90FrameTimeInMicros = _frameTimeFor60FPSInMicros * 1.5; -/// Creates the expected [DevToolsBenchmark]s for the specified compiler. +/// Creates the expected [DevToolsBenchmark] thresholds. +/// +/// Average, p50, and build/raster p90 frame times are held to the 60 FPS budget +/// ([_frameTimeFor60FPSInMicros]). Total frame time p90 on the heavier offline +/// screens uses [_relaxedP90FrameTimeInMicros] to absorb occasional tail-latency +/// jitter on CI runners without masking average/median or build/raster +/// regressions. Map> _benchmarkThresholds( /*bool isWasm*/ ) => { @@ -230,7 +239,7 @@ Map> _benchmarkThresholds( BenchmarkMetric.flutterFrameTotalTime, avg: _frameTimeFor60FPSInMicros, p50: _frameTimeFor60FPSInMicros, - p90: _frameTimeFor60FPSInMicros, + p90: _relaxedP90FrameTimeInMicros, ), ..._valuesForMetric( BenchmarkMetric.flutterFrameBuildTime, @@ -250,7 +259,7 @@ Map> _benchmarkThresholds( BenchmarkMetric.flutterFrameTotalTime, avg: _frameTimeFor60FPSInMicros, p50: _frameTimeFor60FPSInMicros, - p90: _frameTimeFor60FPSInMicros, + p90: _relaxedP90FrameTimeInMicros, ), ..._valuesForMetric( BenchmarkMetric.flutterFrameBuildTime,