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

Side by Side Diff: pkg/front_end/tool/perf.dart

Issue 2489573002: Add analysis options for front end, and fix a bug discovered by strong mode. (Closed)
Patch Set: 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 | « pkg/front_end/.analysis_options ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// An entrypoint used to run portions of front_end and measure its performance. 5 /// An entrypoint used to run portions of front_end and measure its performance.
6 library front_end.tool.perf; 6 library front_end.tool.perf;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:io' show exit, stderr; 9 import 'dart:io' show exit, stderr;
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // the GC pressure on the VM seems to make this worse with time (maybe we 67 // the GC pressure on the VM seems to make this worse with time (maybe we
68 // are leaking memory?). That's why we run it twice and not 10 times. 68 // are leaking memory?). That's why we run it twice and not 10 times.
69 for (int i = 0; i < 2; i++) await generateKernel(entryUri); 69 for (int i = 0; i < 2; i++) await generateKernel(entryUri);
70 }, 70 },
71 }; 71 };
72 72
73 var handler = handlers[bench]; 73 var handler = handlers[bench];
74 if (handler == null) { 74 if (handler == null) {
75 // TODO(sigmund): implement the remaining benchmarks. 75 // TODO(sigmund): implement the remaining benchmarks.
76 print('unsupported bench-id: $bench. Please specify one of the following: ' 76 print('unsupported bench-id: $bench. Please specify one of the following: '
77 '${handler.keys.join(", ")}'); 77 '${handlers.keys.join(", ")}');
78 exit(1); 78 exit(1);
79 } 79 }
80 await handler(); 80 await handler();
81 81
82 totalTimer.stop(); 82 totalTimer.stop();
83 report("total", totalTimer.elapsedMicroseconds); 83 report("total", totalTimer.elapsedMicroseconds);
84 } 84 }
85 85
86 /// Sets up analyzer to be able to load and resolve app, packages, and sdk 86 /// Sets up analyzer to be able to load and resolve app, packages, and sdk
87 /// sources. 87 /// sources.
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 const int errorLimit = 100; 236 const int errorLimit = 100;
237 stderr.writeln(errors.take(errorLimit).join('\n')); 237 stderr.writeln(errors.take(errorLimit).join('\n'));
238 if (errors.length > errorLimit) { 238 if (errors.length > errorLimit) {
239 stderr.writeln('[error] ${errors.length - errorLimit} errors not shown'); 239 stderr.writeln('[error] ${errors.length - errorLimit} errors not shown');
240 } 240 }
241 } 241 }
242 dartkTimer.stop(); 242 dartkTimer.stop();
243 report("kernel_gen_e2e", dartkTimer.elapsedMicroseconds); 243 report("kernel_gen_e2e", dartkTimer.elapsedMicroseconds);
244 return program; 244 return program;
245 } 245 }
OLDNEW
« no previous file with comments | « pkg/front_end/.analysis_options ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698