Skip to content

Commit 6da238c

Browse files
authored
Update to latest Flutter SDK version (#9018)
1 parent 00ec296 commit 6da238c

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

flutter-candidate.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9ffdd3a0ecfa94b94a2fa856fc94e4fcbb2f50c6
1+
b2a4a05683b95e9c08efafb3a0f17193915897d5

packages/devtools_app/benchmark/devtools_benchmarks_test.dart

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,13 @@ void _verifyScoresAgainstThresholds(
124124
}) {
125125
final identifier = '${devToolsBenchmark.id}.${useWasm ? 'wasm' : 'js'}';
126126
stdout.writeln('Verifying $identifier scores against expected thresholds.');
127+
final benchmarkThresholds = _benchmarkThresholds(useWasm);
127128
expect(
128-
_benchmarkThresholds.containsKey(devToolsBenchmark),
129+
benchmarkThresholds.containsKey(devToolsBenchmark),
129130
isTrue,
130131
reason: 'Missing expected thresholds for ${devToolsBenchmark.id}.',
131132
);
132-
final expectedThresholds = _benchmarkThresholds[devToolsBenchmark]!;
133+
final expectedThresholds = benchmarkThresholds[devToolsBenchmark]!;
133134

134135
final scoresAsMap = Map.fromEntries([
135136
for (final score in scores) MapEntry(score.metric, score),
@@ -171,8 +172,13 @@ void _verifyScoresAgainstThresholds(
171172
}
172173

173174
const _frameTimeFor60FPSInMicros = 16666.6;
175+
const _frameTimeFor30FPSInMicros = 33333.3;
174176

175-
final _benchmarkThresholds = {
177+
/// Creates the expected [DevToolsBenchmark]s for the specified compiler.
178+
///
179+
/// Note that some of the wasm benchmarks use a 30fps frame budget instead of
180+
/// the 60fps frame budget due to https://issues.chromium.org/issues/396208308.
181+
Map<DevToolsBenchmark, Map<String, num>> _benchmarkThresholds(bool isWasm) => {
176182
// Note that some of these benchmarks exceed the 60fps frame budget,
177183
// especially the p90 benchmarks.
178184
//
@@ -205,7 +211,7 @@ final _benchmarkThresholds = {
205211
..._valuesForMetric(
206212
BenchmarkMetric.flutterFrameTotalTime,
207213
avg: _frameTimeFor60FPSInMicros * 2,
208-
p50: _frameTimeFor60FPSInMicros,
214+
p50: isWasm ? _frameTimeFor30FPSInMicros : _frameTimeFor60FPSInMicros,
209215
p90: _frameTimeFor60FPSInMicros * 6,
210216
),
211217
..._valuesForMetric(
@@ -217,8 +223,8 @@ final _benchmarkThresholds = {
217223
..._valuesForMetric(
218224
BenchmarkMetric.flutterFrameRasterTime,
219225
avg: _frameTimeFor60FPSInMicros * 2,
220-
p50: _frameTimeFor60FPSInMicros,
221-
p90: _frameTimeFor60FPSInMicros,
226+
p50: isWasm ? _frameTimeFor30FPSInMicros : _frameTimeFor60FPSInMicros,
227+
p90: isWasm ? _frameTimeFor30FPSInMicros * 2 : _frameTimeFor60FPSInMicros,
222228
),
223229
},
224230
DevToolsBenchmark.offlinePerformanceScreen: {

0 commit comments

Comments
 (0)