forked from firka/flutter
Memory/cpu/gpu benchmark for showing large images in succession (#64762)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// 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/framework/adb.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/framework/utils.dart';
|
||||
import 'package:flutter_devicelab/tasks/perf_tests.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
deviceOperatingSystem = DeviceOperatingSystem.android;
|
||||
await task(DevToolsMemoryTest(
|
||||
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
|
||||
'test_driver/large_image_changer.dart',
|
||||
).run);
|
||||
}
|
||||
20
dev/devicelab/bin/tasks/large_image_changer_perf_ios.dart
Normal file
20
dev/devicelab/bin/tasks/large_image_changer_perf_ios.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
// 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/framework/adb.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/framework/utils.dart';
|
||||
import 'package:flutter_devicelab/tasks/perf_tests.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
deviceOperatingSystem = DeviceOperatingSystem.ios;
|
||||
await task(PerfTest(
|
||||
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
|
||||
'test_driver/large_image_changer.dart',
|
||||
'large_image_changer',
|
||||
measureCpuGpu: true,
|
||||
).run);
|
||||
}
|
||||
@@ -1125,11 +1125,15 @@ class DevToolsMemoryTest {
|
||||
.listen((String line) {
|
||||
print('run stdout: $line');
|
||||
final RegExpMatch match = RegExp(r'An Observatory debugger and profiler on .+ is available at: ((http|//)[a-zA-Z0-9:/=_\-\.\[\]]+)').firstMatch(line);
|
||||
if (match != null) {
|
||||
if (match != null && !observatoryUri.isCompleted) {
|
||||
observatoryUri.complete(match[1]);
|
||||
_observatoryUri = match[1];
|
||||
}
|
||||
}, onDone: () { observatoryUri.complete(null); });
|
||||
}, onDone: () {
|
||||
if (!observatoryUri.isCompleted) {
|
||||
observatoryUri.complete();
|
||||
}
|
||||
});
|
||||
_forwardStream(_runProcess.stderr, 'run stderr');
|
||||
|
||||
_observatoryUri = await observatoryUri.future;
|
||||
|
||||
@@ -867,6 +867,20 @@ tasks:
|
||||
stage: devicelab
|
||||
required_agent_capabilities: ["linux/android"]
|
||||
|
||||
large_image_changer_perf_android:
|
||||
description: >
|
||||
Measures memory usage when rotating through a series of large images.
|
||||
stage: devicelab
|
||||
required_agent_capabilities: ["linux/android"]
|
||||
flaky: true
|
||||
|
||||
large_image_changer_perf_ios:
|
||||
description: >
|
||||
Measures memory, cpu, and gpu usage when rotating through a series of large images.
|
||||
stage: devicelab
|
||||
required_agent_capabilities: ["mac/ios"]
|
||||
flaky: true
|
||||
|
||||
animated_placeholder_perf:
|
||||
description: >
|
||||
Measures frame build and rasterizer times, as well as frame build counts
|
||||
|
||||
Reference in New Issue
Block a user