Force GC before GC-sensitive benchmark runs (#23289)

This commit is contained in:
Michael Goderbauer
2018-10-21 15:58:19 +02:00
committed by GitHub
parent 7aeb539da9
commit 9b5c780604
3 changed files with 22 additions and 0 deletions

View File

@@ -26,6 +26,9 @@ void main() {
// benchmark has greater noise.
// See: https://github.com/flutter/flutter/issues/19434
await Future<void>.delayed(const Duration(milliseconds: 250));
await driver.forceGC();
final Timeline timeline = await driver.traceAction(() async {
// Find the scrollable stock list
final SerializableFinder list = find.byValueKey(listKey);

View File

@@ -27,6 +27,8 @@ void main() {
// Let app become fully idle.
await Future<void>.delayed(const Duration(seconds: 2));
await driver.forceGC();
final Timeline timeline = await driver.traceAction(() async {
expect(await driver.setSemantics(true), isTrue);
});