Skip to content

Commit

Permalink
[devicelab] retain first frame data in certain integration tests. (#1…
Browse files Browse the repository at this point in the history
…43419)

Part of flutter/flutter#143404

We currently drop the first N frames of all benchmarks. For the app based benchmarks (not microbenchmarks) this is harmful as we miss first time initialization costs in our CI.

Still need to do this with flutter/gallery, but that lives in a different repo.
  • Loading branch information
jonahwilliams authored Feb 14, 2024
1 parent e2567f4 commit 295eeaf
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void main() {
await driver.scroll(list, 0.0, 300.0, const Duration(milliseconds: 300));
await Future<void>.delayed(const Duration(milliseconds: 500));
}
});
}, retainPriorEvents: true);

final TimelineSummary summary = TimelineSummary.summarize(timeline);
await summary.writeTimelineToFile(summaryName, pretty: true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void main() {
await driver.scroll(list, 0.0, 300.0, const Duration(milliseconds: 300));
await Future<void>.delayed(const Duration(milliseconds: 500));
}
});
}, retainPriorEvents: true);

final TimelineSummary summary = TimelineSummary.summarize(timeline);
await summary.writeTimelineToFile(summaryName, pretty: true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void main() {
await driver.tap(find.byTooltip('Back'));
await Future<void>.delayed(const Duration(milliseconds: 500));
}
});
}, retainPriorEvents: true);

final TimelineSummary summary = TimelineSummary.summarize(timeline);
await summary.writeTimelineToFile('page_transition_perf', pretty: true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ void main() {

final SerializableFinder demoList = find.byValueKey('GalleryDemoList');

// TODO(eseidel): These are very artificial scrolls, we should use better
// https://github.com/flutter/flutter/issues/3316
// Scroll down
for (int i = 0; i < 5; i++) {
await driver.scroll(demoList, 0.0, -300.0, const Duration(milliseconds: 300));
await Future<void>.delayed(const Duration(milliseconds: 500));
Expand All @@ -38,7 +35,7 @@ void main() {
await driver.scroll(demoList, 0.0, 300.0, const Duration(milliseconds: 300));
await Future<void>.delayed(const Duration(milliseconds: 500));
}
});
}, retainPriorEvents: true);

final TimelineSummary summary = TimelineSummary.summarize(timeline);
await summary.writeTimelineToFile('home_scroll_perf', pretty: true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ void main([List<String> args = const <String>[]]) {
TimelineStream.embedder,
TimelineStream.gc,
],
retainPriorEvents: true,
);

// Save the duration (in microseconds) of the first timeline Frame event
Expand Down

0 comments on commit 295eeaf

Please sign in to comment.