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

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

Issue 2432043008: Copy perf.dart into front_end/tool. (Closed)
Patch Set: Created 4 years, 2 months 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/pubspec.yaml ('k') | pkg/front_end/tool/perf_test.dart » ('j') | 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 analyzer and measure its performance. 5 /// An entrypoint used to run portions of front_end and measure its performance.
6 library analyzer_cli.tool.perf; 6 library front_end.tool.perf;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:io' show exit; 9 import 'dart:io' show exit;
10 10
11 import 'package:analyzer/dart/ast/ast.dart'; 11 import 'package:analyzer/dart/ast/ast.dart';
12 import 'package:analyzer/dart/ast/token.dart'; 12 import 'package:analyzer/dart/ast/token.dart';
13 import 'package:analyzer/error/listener.dart'; 13 import 'package:analyzer/error/listener.dart';
14 import 'package:analyzer/file_system/file_system.dart' show ResourceUriResolver; 14 import 'package:analyzer/file_system/file_system.dart' show ResourceUriResolver;
15 import 'package:analyzer/file_system/physical_file_system.dart' 15 import 'package:analyzer/file_system/physical_file_system.dart'
16 show PhysicalResourceProvider; 16 show PhysicalResourceProvider;
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } 194 }
195 195
196 /// Report that metric [name] took [time] micro-seconds to process 196 /// Report that metric [name] took [time] micro-seconds to process
197 /// [scanTotalChars] characters. 197 /// [scanTotalChars] characters.
198 void report(String name, int time) { 198 void report(String name, int time) {
199 var sb = new StringBuffer(); 199 var sb = new StringBuffer();
200 sb.write('$name: $time us, ${time ~/ 1000} ms'); 200 sb.write('$name: $time us, ${time ~/ 1000} ms');
201 sb.write(', ${scanTotalChars * 1000 ~/ time} chars/ms'); 201 sb.write(', ${scanTotalChars * 1000 ~/ time} chars/ms');
202 print('$sb'); 202 print('$sb');
203 } 203 }
OLDNEW
« no previous file with comments | « pkg/front_end/pubspec.yaml ('k') | pkg/front_end/tool/perf_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698