From ebb174b0bfadb10bd9665d294f30001e23997b55 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Sat, 16 Jun 2018 00:08:33 -0700 Subject: [PATCH] Add size benchmark for hello_world (#18522) --- .../bin/tasks/hello_world_android__compile.dart | 14 ++++++++++++++ .../bin/tasks/hello_world_ios__compile.dart | 14 ++++++++++++++ dev/devicelab/lib/tasks/perf_tests.dart | 4 ++++ dev/devicelab/manifest.yaml | 12 ++++++++++++ 4 files changed, 44 insertions(+) create mode 100644 dev/devicelab/bin/tasks/hello_world_android__compile.dart create mode 100644 dev/devicelab/bin/tasks/hello_world_ios__compile.dart diff --git a/dev/devicelab/bin/tasks/hello_world_android__compile.dart b/dev/devicelab/bin/tasks/hello_world_android__compile.dart new file mode 100644 index 0000000000..41baadc63c --- /dev/null +++ b/dev/devicelab/bin/tasks/hello_world_android__compile.dart @@ -0,0 +1,14 @@ +// Copyright 2018 The Chromium 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/tasks/perf_tests.dart'; + +Future main() async { + deviceOperatingSystem = DeviceOperatingSystem.android; + await task(createHelloWorldCompileTest()); +} diff --git a/dev/devicelab/bin/tasks/hello_world_ios__compile.dart b/dev/devicelab/bin/tasks/hello_world_ios__compile.dart new file mode 100644 index 0000000000..55bc3a0da7 --- /dev/null +++ b/dev/devicelab/bin/tasks/hello_world_ios__compile.dart @@ -0,0 +1,14 @@ +// Copyright 2018 The Chromium 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/tasks/perf_tests.dart'; + +Future main() async { + deviceOperatingSystem = DeviceOperatingSystem.ios; + await task(createHelloWorldCompileTest()); +} diff --git a/dev/devicelab/lib/tasks/perf_tests.dart b/dev/devicelab/lib/tasks/perf_tests.dart index c37a8ce502..5d81e847e0 100644 --- a/dev/devicelab/lib/tasks/perf_tests.dart +++ b/dev/devicelab/lib/tasks/perf_tests.dart @@ -43,6 +43,10 @@ TaskFunction createFlutterGalleryCompileTest() { return new CompileTest('${flutterDirectory.path}/examples/flutter_gallery').run; } +TaskFunction createHelloWorldCompileTest() { + return new CompileTest('${flutterDirectory.path}/examples/hello_world').run; +} + TaskFunction createComplexLayoutCompileTest() { return new CompileTest('${flutterDirectory.path}/dev/benchmarks/complex_layout').run; } diff --git a/dev/devicelab/manifest.yaml b/dev/devicelab/manifest.yaml index 65b82cb9b0..08a488c7a8 100644 --- a/dev/devicelab/manifest.yaml +++ b/dev/devicelab/manifest.yaml @@ -182,6 +182,12 @@ tasks: stage: devicelab required_agent_capabilities: ["mac/android"] + hello_world_android__compile: + description: > + Measures the APK size of Hello World. + stage: devicelab + required_agent_capabilities: ["mac/android"] + hello_world__memory: description: > Measures starting memory usage of the simplest Flutter app. @@ -333,6 +339,12 @@ tasks: stage: devicelab_ios required_agent_capabilities: ["mac/ios"] + hello_world_ios__compile: + description: > + Measures the IPA size of Hello World. + stage: devicelab + required_agent_capabilities: ["mac/ios"] + microbenchmarks_ios: description: > Runs benchmarks from dev/benchmarks/microbenchmarks on iOS.