[devicelab] opt gallery benchmarks and platform view test into merged thread mode. (#152940)
Testing for https://github.com/flutter/flutter/issues/150525 Benchmark testing and sanity checking before I flip the default for iOS.
This commit is contained in:
parent
8329f67639
commit
6cea3d6a3d
@ -17,6 +17,7 @@ class NewGalleryPerfTest extends PerfTest {
|
|||||||
'test_driver/transitions_perf.dart',
|
'test_driver/transitions_perf.dart',
|
||||||
timelineFileName,
|
timelineFileName,
|
||||||
dartDefine: dartDefine,
|
dartDefine: dartDefine,
|
||||||
createPlatforms: <String>['android', 'ios', 'web']
|
createPlatforms: <String>['android', 'ios', 'web'],
|
||||||
|
enableMergedPlatformThread: true,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,7 @@ TaskFunction createUiKitViewScrollPerfTest({bool? enableImpeller}) {
|
|||||||
testDriver: 'test_driver/scroll_perf_test.dart',
|
testDriver: 'test_driver/scroll_perf_test.dart',
|
||||||
needsFullTimeline: false,
|
needsFullTimeline: false,
|
||||||
enableImpeller: enableImpeller,
|
enableImpeller: enableImpeller,
|
||||||
|
enableMergedPlatformThread: true,
|
||||||
).run;
|
).run;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -809,10 +810,11 @@ Map<String, dynamic> _average(List<Map<String, dynamic>> results, int iterations
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Opens the file at testDirectory + 'ios/Runner/Info.plist'
|
/// Opens the file at testDirectory + 'ios/Runner/Info.plist'
|
||||||
/// and adds the following entry to the application.
|
/// and adds additional manifest settings.
|
||||||
/// <FTLDisablePartialRepaint/>
|
void _updateManifestSettings(String testDirectory, {
|
||||||
/// <true/>
|
required bool disablePartialRepaint,
|
||||||
void _disablePartialRepaint(String testDirectory) {
|
required bool platformThreadMerged
|
||||||
|
}) {
|
||||||
final String manifestPath = path.join(
|
final String manifestPath = path.join(
|
||||||
testDirectory, 'ios', 'Runner', 'Info.plist');
|
testDirectory, 'ios', 'Runner', 'Info.plist');
|
||||||
final File file = File(manifestPath);
|
final File file = File(manifestPath);
|
||||||
@ -824,7 +826,10 @@ void _disablePartialRepaint(String testDirectory) {
|
|||||||
final String xmlStr = file.readAsStringSync();
|
final String xmlStr = file.readAsStringSync();
|
||||||
final XmlDocument xmlDoc = XmlDocument.parse(xmlStr);
|
final XmlDocument xmlDoc = XmlDocument.parse(xmlStr);
|
||||||
final List<(String, String)> keyPairs = <(String, String)>[
|
final List<(String, String)> keyPairs = <(String, String)>[
|
||||||
('FLTDisablePartialRepaint', 'true'),
|
if (disablePartialRepaint)
|
||||||
|
('FLTDisablePartialRepaint', disablePartialRepaint.toString()),
|
||||||
|
if (platformThreadMerged)
|
||||||
|
('FLTEnableMergedPlatformUIThread', platformThreadMerged.toString())
|
||||||
];
|
];
|
||||||
|
|
||||||
final XmlElement applicationNode =
|
final XmlElement applicationNode =
|
||||||
@ -1222,6 +1227,7 @@ class PerfTest {
|
|||||||
this.enableImpeller,
|
this.enableImpeller,
|
||||||
this.forceOpenGLES,
|
this.forceOpenGLES,
|
||||||
this.disablePartialRepaint = false,
|
this.disablePartialRepaint = false,
|
||||||
|
this.enableMergedPlatformThread = false,
|
||||||
this.createPlatforms = const <String>[],
|
this.createPlatforms = const <String>[],
|
||||||
}): _resultFilename = resultFilename;
|
}): _resultFilename = resultFilename;
|
||||||
|
|
||||||
@ -1242,6 +1248,7 @@ class PerfTest {
|
|||||||
this.enableImpeller,
|
this.enableImpeller,
|
||||||
this.forceOpenGLES,
|
this.forceOpenGLES,
|
||||||
this.disablePartialRepaint = false,
|
this.disablePartialRepaint = false,
|
||||||
|
this.enableMergedPlatformThread = false,
|
||||||
this.createPlatforms = const <String>[],
|
this.createPlatforms = const <String>[],
|
||||||
}) : saveTraceFile = false, timelineFileName = null, _resultFilename = resultFilename;
|
}) : saveTraceFile = false, timelineFileName = null, _resultFilename = resultFilename;
|
||||||
|
|
||||||
@ -1285,6 +1292,9 @@ class PerfTest {
|
|||||||
/// Whether partial repaint functionality should be disabled (iOS only).
|
/// Whether partial repaint functionality should be disabled (iOS only).
|
||||||
final bool disablePartialRepaint;
|
final bool disablePartialRepaint;
|
||||||
|
|
||||||
|
/// Whether the UI thread should be the platform thread.
|
||||||
|
final bool enableMergedPlatformThread;
|
||||||
|
|
||||||
/// Number of seconds to time out the test after, allowing debug callbacks to run.
|
/// Number of seconds to time out the test after, allowing debug callbacks to run.
|
||||||
final int? timeoutSeconds;
|
final int? timeoutSeconds;
|
||||||
|
|
||||||
@ -1380,9 +1390,13 @@ class PerfTest {
|
|||||||
_addOpenGLESToManifest(testDirectory);
|
_addOpenGLESToManifest(testDirectory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (disablePartialRepaint) {
|
if (disablePartialRepaint || enableMergedPlatformThread) {
|
||||||
changedPlist = true;
|
changedPlist = true;
|
||||||
_disablePartialRepaint(testDirectory);
|
_updateManifestSettings(
|
||||||
|
testDirectory,
|
||||||
|
disablePartialRepaint: disablePartialRepaint,
|
||||||
|
platformThreadMerged: enableMergedPlatformThread
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
final List<String> options = <String>[
|
final List<String> options = <String>[
|
||||||
|
Loading…
x
Reference in New Issue
Block a user