migrate flutter_gallery_sksl_warmup__transition_perf to e2e (#64275)
This commit is contained in:
parent
35c95a2fce
commit
d30e36ba8c
@ -0,0 +1,14 @@
|
|||||||
|
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:flutter_devicelab/tasks/perf_tests.dart';
|
||||||
|
import 'package:flutter_devicelab/framework/adb.dart';
|
||||||
|
import 'package:flutter_devicelab/framework/framework.dart';
|
||||||
|
|
||||||
|
Future<void> main() async {
|
||||||
|
deviceOperatingSystem = DeviceOperatingSystem.android;
|
||||||
|
await task(createFlutterGalleryTransitionsPerfSkSLWarmupE2ETest());
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:flutter_devicelab/tasks/perf_tests.dart';
|
||||||
|
import 'package:flutter_devicelab/framework/adb.dart';
|
||||||
|
import 'package:flutter_devicelab/framework/framework.dart';
|
||||||
|
|
||||||
|
Future<void> main() async {
|
||||||
|
deviceOperatingSystem = DeviceOperatingSystem.ios;
|
||||||
|
await task(createFlutterGalleryTransitionsPerfSkSLWarmupE2ETest());
|
||||||
|
}
|
@ -77,7 +77,7 @@ TaskFunction createCullOpacityPerfTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TaskFunction createCullOpacityPerfE2ETest() {
|
TaskFunction createCullOpacityPerfE2ETest() {
|
||||||
return E2EPerfTest(
|
return PerfTest.e2e(
|
||||||
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
|
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
|
||||||
'test/cull_opacity_perf_e2e.dart',
|
'test/cull_opacity_perf_e2e.dart',
|
||||||
).run;
|
).run;
|
||||||
@ -109,6 +109,14 @@ TaskFunction createFlutterGalleryTransitionsPerfSkSLWarmupTest() {
|
|||||||
).run;
|
).run;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TaskFunction createFlutterGalleryTransitionsPerfSkSLWarmupE2ETest() {
|
||||||
|
return PerfTestWithSkSL.e2e(
|
||||||
|
'${flutterDirectory.path}/dev/integration_tests/flutter_gallery',
|
||||||
|
'test_driver/transitions_perf_e2e.dart',
|
||||||
|
testDriver: 'test_driver/transitions_perf_e2e_test.dart',
|
||||||
|
).run;
|
||||||
|
}
|
||||||
|
|
||||||
TaskFunction createBackdropFilterPerfTest({bool measureCpuGpu = false}) {
|
TaskFunction createBackdropFilterPerfTest({bool measureCpuGpu = false}) {
|
||||||
return PerfTest(
|
return PerfTest(
|
||||||
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
|
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
|
||||||
@ -162,7 +170,7 @@ TaskFunction createPictureCachePerfTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TaskFunction createPictureCachePerfE2ETest() {
|
TaskFunction createPictureCachePerfE2ETest() {
|
||||||
return E2EPerfTest(
|
return PerfTest.e2e(
|
||||||
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
|
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
|
||||||
'test/picture_cache_perf_e2e.dart',
|
'test/picture_cache_perf_e2e.dart',
|
||||||
).run;
|
).run;
|
||||||
@ -284,7 +292,7 @@ TaskFunction createsMultiWidgetConstructPerfTest() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TaskFunction createsMultiWidgetConstructPerfE2ETest() {
|
TaskFunction createsMultiWidgetConstructPerfE2ETest() {
|
||||||
return E2EPerfTest(
|
return PerfTest.e2e(
|
||||||
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
|
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
|
||||||
'test/multi_widget_construction_perf_e2e.dart',
|
'test/multi_widget_construction_perf_e2e.dart',
|
||||||
).run;
|
).run;
|
||||||
@ -380,7 +388,19 @@ class PerfTest {
|
|||||||
this.needsFullTimeline = true,
|
this.needsFullTimeline = true,
|
||||||
this.benchmarkScoreKeys,
|
this.benchmarkScoreKeys,
|
||||||
this.dartDefine = '',
|
this.dartDefine = '',
|
||||||
});
|
String resultFilename,
|
||||||
|
}): _resultFilename = resultFilename;
|
||||||
|
|
||||||
|
const PerfTest.e2e(
|
||||||
|
this.testDirectory,
|
||||||
|
this.testTarget, {
|
||||||
|
this.measureCpuGpu = false,
|
||||||
|
this.testDriver = 'test_driver/e2e_test.dart',
|
||||||
|
this.needsFullTimeline = false,
|
||||||
|
this.benchmarkScoreKeys = _kCommonScoreKeys,
|
||||||
|
this.dartDefine = '',
|
||||||
|
String resultFilename = 'e2e_perf_summary',
|
||||||
|
}) : saveTraceFile = false, timelineFileName = null, _resultFilename = resultFilename;
|
||||||
|
|
||||||
/// The directory where the app under test is defined.
|
/// The directory where the app under test is defined.
|
||||||
final String testDirectory;
|
final String testDirectory;
|
||||||
@ -388,8 +408,9 @@ class PerfTest {
|
|||||||
final String testTarget;
|
final String testTarget;
|
||||||
// The prefix name of the filename such as `<timelineFileName>.timeline_summary.json`.
|
// The prefix name of the filename such as `<timelineFileName>.timeline_summary.json`.
|
||||||
final String timelineFileName;
|
final String timelineFileName;
|
||||||
String get resultFilename => '$timelineFileName.timeline_summary';
|
|
||||||
String get traceFilename => '$timelineFileName.timeline';
|
String get traceFilename => '$timelineFileName.timeline';
|
||||||
|
String get resultFilename => _resultFilename ?? '$timelineFileName.timeline_summary';
|
||||||
|
final String _resultFilename;
|
||||||
/// The test file to run on the host.
|
/// The test file to run on the host.
|
||||||
final String testDriver;
|
final String testDriver;
|
||||||
/// Whether to collect CPU and GPU metrics.
|
/// Whether to collect CPU and GPU metrics.
|
||||||
@ -480,14 +501,7 @@ class PerfTest {
|
|||||||
data,
|
data,
|
||||||
detailFiles: detailFiles.isNotEmpty ? detailFiles : null,
|
detailFiles: detailFiles.isNotEmpty ? detailFiles : null,
|
||||||
benchmarkScoreKeys: benchmarkScoreKeys ?? <String>[
|
benchmarkScoreKeys: benchmarkScoreKeys ?? <String>[
|
||||||
'average_frame_build_time_millis',
|
..._kCommonScoreKeys,
|
||||||
'worst_frame_build_time_millis',
|
|
||||||
'90th_percentile_frame_build_time_millis',
|
|
||||||
'99th_percentile_frame_build_time_millis',
|
|
||||||
'average_frame_rasterizer_time_millis',
|
|
||||||
'worst_frame_rasterizer_time_millis',
|
|
||||||
'90th_percentile_frame_rasterizer_time_millis',
|
|
||||||
'99th_percentile_frame_rasterizer_time_millis',
|
|
||||||
'average_vsync_transitions_missed',
|
'average_vsync_transitions_missed',
|
||||||
'90th_percentile_vsync_transitions_missed',
|
'90th_percentile_vsync_transitions_missed',
|
||||||
'99th_percentile_vsync_transitions_missed',
|
'99th_percentile_vsync_transitions_missed',
|
||||||
@ -499,34 +513,16 @@ class PerfTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class E2EPerfTest extends PerfTest {
|
const List<String> _kCommonScoreKeys = <String>[
|
||||||
const E2EPerfTest(
|
'average_frame_build_time_millis',
|
||||||
String testDirectory,
|
'worst_frame_build_time_millis',
|
||||||
String testTarget, {
|
'90th_percentile_frame_build_time_millis',
|
||||||
String summaryFilename,
|
'99th_percentile_frame_build_time_millis',
|
||||||
List<String> benchmarkScoreKeys,
|
'average_frame_rasterizer_time_millis',
|
||||||
}
|
'worst_frame_rasterizer_time_millis',
|
||||||
) : super(
|
'90th_percentile_frame_rasterizer_time_millis',
|
||||||
testDirectory,
|
'99th_percentile_frame_rasterizer_time_millis',
|
||||||
testTarget,
|
];
|
||||||
summaryFilename,
|
|
||||||
testDriver: 'test_driver/e2e_test.dart',
|
|
||||||
needsFullTimeline: false,
|
|
||||||
benchmarkScoreKeys: benchmarkScoreKeys ?? const <String>[
|
|
||||||
'average_frame_build_time_millis',
|
|
||||||
'worst_frame_build_time_millis',
|
|
||||||
'90th_percentile_frame_build_time_millis',
|
|
||||||
'99th_percentile_frame_build_time_millis',
|
|
||||||
'average_frame_rasterizer_time_millis',
|
|
||||||
'worst_frame_rasterizer_time_millis',
|
|
||||||
'90th_percentile_frame_rasterizer_time_millis',
|
|
||||||
'99th_percentile_frame_rasterizer_time_millis',
|
|
||||||
],
|
|
||||||
);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String get resultFilename => timelineFileName ?? 'e2e_perf_summary';
|
|
||||||
}
|
|
||||||
|
|
||||||
class PerfTestWithSkSL extends PerfTest {
|
class PerfTestWithSkSL extends PerfTest {
|
||||||
PerfTestWithSkSL(
|
PerfTestWithSkSL(
|
||||||
@ -535,12 +531,30 @@ class PerfTestWithSkSL extends PerfTest {
|
|||||||
String timelineFileName, {
|
String timelineFileName, {
|
||||||
bool measureCpuGpu = false,
|
bool measureCpuGpu = false,
|
||||||
String testDriver,
|
String testDriver,
|
||||||
|
bool needsFullTimeline = true,
|
||||||
|
List<String> benchmarkScoreKeys,
|
||||||
}) : super(
|
}) : super(
|
||||||
testDirectory,
|
testDirectory,
|
||||||
testTarget,
|
testTarget,
|
||||||
timelineFileName,
|
timelineFileName,
|
||||||
measureCpuGpu: measureCpuGpu,
|
measureCpuGpu: measureCpuGpu,
|
||||||
testDriver: testDriver,
|
testDriver: testDriver,
|
||||||
|
needsFullTimeline: needsFullTimeline,
|
||||||
|
benchmarkScoreKeys: benchmarkScoreKeys,
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
PerfTestWithSkSL.e2e(
|
||||||
|
String testDirectory,
|
||||||
|
String testTarget, {
|
||||||
|
String testDriver = 'test_driver/e2e_test.dart',
|
||||||
|
String resultFilename = 'e2e_perf_summary',
|
||||||
|
}) : super.e2e(
|
||||||
|
testDirectory,
|
||||||
|
testTarget,
|
||||||
|
testDriver: testDriver,
|
||||||
|
needsFullTimeline: false,
|
||||||
|
resultFilename: resultFilename,
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -216,6 +216,14 @@ tasks:
|
|||||||
required_agent_capabilities: ["mac/ios32"]
|
required_agent_capabilities: ["mac/ios32"]
|
||||||
flaky: true
|
flaky: true
|
||||||
|
|
||||||
|
flutter_gallery_sksl_warmup__transition_perf_e2e_ios32:
|
||||||
|
description: >
|
||||||
|
Measures the runtime performance of Flutter gallery transitions on iPhone4s
|
||||||
|
with SkSL shader warm-up with e2e.
|
||||||
|
stage: devicelab_ios
|
||||||
|
required_agent_capabilities: ["mac/ios32"]
|
||||||
|
flaky: true
|
||||||
|
|
||||||
backdrop_filter_perf__timeline_summary:
|
backdrop_filter_perf__timeline_summary:
|
||||||
description: >
|
description: >
|
||||||
Measures the runtime performance of backdrop filter blurs on Android.
|
Measures the runtime performance of backdrop filter blurs on Android.
|
||||||
@ -796,6 +804,14 @@ tasks:
|
|||||||
stage: devicelab
|
stage: devicelab
|
||||||
required_agent_capabilities: ["linux/android"]
|
required_agent_capabilities: ["linux/android"]
|
||||||
|
|
||||||
|
flutter_gallery_sksl_warmup__transition_perf_e2e:
|
||||||
|
description: >
|
||||||
|
Measures the runtime performance of Flutter gallery transitions on Android
|
||||||
|
with SkSL shader warm-up with e2e.
|
||||||
|
stage: devicelab
|
||||||
|
required_agent_capabilities: ["linux/android"]
|
||||||
|
flaky: true
|
||||||
|
|
||||||
flutter_gallery__transition_perf_with_semantics:
|
flutter_gallery__transition_perf_with_semantics:
|
||||||
description: >
|
description: >
|
||||||
Measures the delta in performance of screen transitions without and
|
Measures the delta in performance of screen transitions without and
|
||||||
|
@ -1 +1,3 @@
|
|||||||
lib/generated_plugin_registrant.dart
|
lib/generated_plugin_registrant.dart
|
||||||
|
vmservice.out
|
||||||
|
*.sksl.json
|
||||||
|
Loading…
x
Reference in New Issue
Block a user