This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +43
-8
lines changed Expand file tree Collapse file tree 4 files changed +43
-8
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,16 @@ targets:
142142 presubmit : false
143143 properties :
144144 build_host : " true"
145+ upload_metrics : " true"
146+ timeout : 60
147+ scheduler : luci
148+
149+ - name : Linux Benchmarks (no-upload)
150+ bringup : true
151+ recipe : engine/engine_metrics
152+ properties :
153+ build_host : " true"
154+ upload_metrics : " false"
145155 timeout : 60
146156 scheduler : luci
147157
Original file line number Diff line number Diff line change 77import 'dart:convert' ;
88import 'dart:io' ;
99
10+ import 'package:args/args.dart' ;
1011import 'package:metrics_center/metrics_center.dart' ;
1112import 'package:path/path.dart' as p;
1213
@@ -81,11 +82,32 @@ Future<FlutterDestination> connectFlutterDestination() async {
8182 );
8283}
8384
85+ ArgParser _serupOptions () {
86+ final ArgParser parser = ArgParser ();
87+ parser.addOption (
88+ 'json' ,
89+ mandatory: true ,
90+ help: 'Path to the benchmarks json file.' ,
91+ );
92+ parser.addFlag (
93+ 'no-upload' ,
94+ help: 'Upload the parsed benchmarks.' ,
95+ defaultsTo: false ,
96+ );
97+ return parser;
98+ }
99+
84100Future <void > main (List <String > args) async {
85- if (args.length != 1 ) {
86- throw 'Must have one argument: <benchmark_json_file>' ;
101+ final ArgParser parser = _serupOptions ();
102+ final ArgResults options = parser.parse (args);
103+
104+ final String json = options['json' ] as String ;
105+ final PointsAndDate pointsAndDate = await parse (json);
106+
107+ final bool noUpload = options['no-upload' ] as bool ;
108+ if (noUpload) {
109+ return ;
87110 }
88- final PointsAndDate pointsAndDate = await parse (args[0 ]);
89111
90112 // The data will be sent to the Datastore of the GCP project specified through
91113 // environment variable BENCHMARK_GCP_CREDENTIALS, or TOKEN_PATH/GCP_PROJECT.
Original file line number Diff line number Diff line change 55name : flutter_engine_benchmark
66publish_to : none
77environment :
8- sdk : " >=2.2.2 <3.0.0"
8+ sdk : ' >=2.12.0-0 <3.0.0'
99
1010# Do not add any dependencies that require more than what is provided in
1111# //third_party/pkg, //third_party/dart/pkg, or
@@ -17,6 +17,7 @@ environment:
1717# relative to this directory into //third_party/dart
1818
1919dependencies :
20+ args : any
2021 metrics_center : any
2122 path : any
2223
@@ -26,6 +27,8 @@ dev_dependencies:
2627dependency_overrides :
2728 _discoveryapis_commons :
2829 path : ../../../third_party/pkg/googleapis/discoveryapis_commons
30+ args :
31+ path : ../../../third_party/dart/third_party/pkg/args
2932 async_helper :
3033 path : ../../../third_party/dart/pkg/async_helper
3134 async :
Original file line number Diff line number Diff line change @@ -37,10 +37,10 @@ DART="${DART_SDK_DIR}/bin/dart"
3737
3838cd " $SCRIPT_DIR "
3939" $DART " --disable-dart-dev bin/parse_and_send.dart \
40- ../../../out/host_release/txt_benchmarks.json
40+ --json ../../../out/host_release/txt_benchmarks.json " $@ "
4141" $DART " --disable-dart-dev bin/parse_and_send.dart \
42- ../../../out/host_release/fml_benchmarks.json
42+ --json ../../../out/host_release/fml_benchmarks.json " $@ "
4343" $DART " --disable-dart-dev bin/parse_and_send.dart \
44- ../../../out/host_release/shell_benchmarks.json
44+ --json ../../../out/host_release/shell_benchmarks.json " $@ "
4545" $DART " --disable-dart-dev bin/parse_and_send.dart \
46- ../../../out/host_release/ui_benchmarks.json
46+ --json ../../../out/host_release/ui_benchmarks.json " $@ "
You can’t perform that action at this time.
0 commit comments