Skip to content

Commit

Permalink
[openpay] Create an OpenPay benchmark (#107838)
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik authored Jul 21, 2022
1 parent 6abd369 commit f7504f0
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ platform_properties:
]
os: Linux
device_type: "SM-G973U1"
linux_samsung_a02:
properties:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:32v1"},
{"dependency": "open_jdk", "version": "11"},
{"dependency": "curl", "version": "version:7.64.0"}
]
os: Linux
device_type: "SM-A025V"
mac:
properties:
dependencies: >-
Expand Down Expand Up @@ -2251,6 +2261,18 @@ targets:
["devicelab", "android", "linux"]
task_name: android_lifecycles_test

- name: Linux_samsung_a02 openpay_benchmarks__scroll_perf
bringup: true
recipe: devicelab/devicelab_drone
presubmit: false
timeout: 60
properties:
openpay: "true"
tags: >
["devicelab", "android", "linux", "openpay", "samsung", "a02"]
task_name: openpay_benchmarks__scroll_perf
scheduler: luci

- name: Staging_build_linux analyze
presubmit: false
bringup: true
Expand Down
1 change: 1 addition & 0 deletions TESTOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
/dev/devicelab/bin/tasks/gradient_dynamic_perf__e2e_summary.dart @flar @flutter/engine
/dev/devicelab/bin/tasks/gradient_static_perf__e2e_summary.dart @flar @flutter/engine
/dev/devicelab/bin/tasks/animated_complex_opacity_perf__e2e_summary.dart @jonahwilliams @flutter/engine
/dev/devicelab/bin/tasks/openpay_benchmarks__scroll_perf.dart @iskakaushik @flutter/engine

## Windows Android DeviceLab tests
/dev/devicelab/bin/tasks/basic_material_app_win__compile.dart @zanderso @flutter/tool
Expand Down
10 changes: 10 additions & 0 deletions dev/devicelab/bin/tasks/openpay_benchmarks__scroll_perf.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// 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 'package:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/tasks/perf_tests.dart';

Future<void> main() async {
await task(createOpenPayScrollPerfTest());
}
2 changes: 2 additions & 0 deletions dev/devicelab/lib/framework/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,8 @@ void cd(dynamic directory) {

Directory get flutterDirectory => Directory.current.parent.parent;

Directory get openpayDirectory => Directory(requireEnvVar('OPENPAY_CHECKOUT_PATH'));

String requireEnvVar(String name) {
final String? value = Platform.environment[name];

Expand Down
11 changes: 11 additions & 0 deletions dev/devicelab/lib/tasks/perf_tests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,17 @@ TaskFunction createPictureCacheComplexityScoringPerfTest() {
).run;
}

TaskFunction createOpenPayScrollPerfTest({bool measureCpuGpu = true}) {
return PerfTest(
openpayDirectory.path,
'test_driver/scroll_perf.dart',
'openpay_scroll_perf',
measureCpuGpu: measureCpuGpu,
testDriver: 'test_driver/scroll_perf_test.dart',
saveTraceFile: true,
).run;
}

TaskFunction createFlutterGalleryStartupTest({String target = 'lib/main.dart'}) {
return StartupTest(
'${flutterDirectory.path}/dev/integration_tests/flutter_gallery',
Expand Down

0 comments on commit f7504f0

Please sign in to comment.