Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: pkg/compiler/lib/src/dart2js_profile_many.dart

Issue 2473553005: Code cleanup: moving compiler perf tests to compiler/tool (Closed)
Patch Set: siggi cleanup Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/dart2js_stress.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 library dart2js.profile_many;
6
7 import 'dart:async';
8
9 import 'dart2js.dart' as cmdline;
10
11 const String USAGE = """
12 Usage: dart2js_profile_many.dart [OPTIONS] [FILES]
13
14 Invokes dart2js separately for each file using the given options.
15 This is for profiling multiple compilations in the Dart Observatory.
16 """;
17
18 printUsage() {
19 print(USAGE);
20 }
21
22 void main(List<String> args) {
23 List options = [];
24 List files = [];
25
26 for (String arg in args) {
27 if (arg.startsWith('-')) {
28 options.add(arg);
29 } else {
30 files.add(arg);
31 }
32 }
33
34 if (files.length == 0) {
35 printUsage();
36 return;
37 }
38
39 cmdline.exitFunc = (code) {
40 throw "Exit with code $code";
41 };
42
43 Future.forEach(files, (String file) {
44 List subargs = [];
45 subargs.addAll(options);
46 subargs.add(file);
47 return cmdline.compilerMain(subargs).catchError((e) {});
48 }).then((_) {
49 print("Done");
50 });
51 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/dart2js_stress.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698