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

Side by Side Diff: pkg/analyzer_cli/lib/src/perf_report.dart

Issue 2704103002: Some improvements to the command-line analyzer's output. (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library analyzer_cli.src.perf_report; 5 library analyzer_cli.src.perf_report;
6 6
7 import 'dart:convert' show JsonEncoder; 7 import 'dart:convert' show JsonEncoder;
8 import 'dart:io' show Platform; 8 import 'dart:io' show Platform;
9 9
10 import 'package:analyzer/src/generated/utilities_general.dart' 10 import 'package:analyzer/src/generated/utilities_general.dart'
11 show PerformanceTag; 11 show PerformanceTag;
12 import 'package:analyzer/task/model.dart' show AnalysisTask; 12 import 'package:analyzer/task/model.dart' show AnalysisTask;
13 import 'package:analyzer_cli/src/error_formatter.dart'; 13
14 import 'package:analyzer_cli/src/options.dart' show CommandLineOptions; 14 import 'error_formatter.dart';
15 import 'options.dart' show CommandLineOptions;
15 16
16 const _JSON = const JsonEncoder.withIndent(" "); 17 const _JSON = const JsonEncoder.withIndent(" ");
17 18
18 bool _isCheckedMode = () { 19 bool _isCheckedMode = () {
19 bool x = true; 20 bool x = true;
20 try { 21 try {
21 // Trigger an exception if we're in checked mode. 22 // Trigger an exception if we're in checked mode.
22 x = "" as dynamic; 23 x = "" as dynamic;
23 return x != ""; // return false; suppress unused variable warning 24 return x != ""; // return false; suppress unused variable warning
24 } catch (e) { 25 } catch (e) {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 104 }
104 105
105 class _TaskRow { 106 class _TaskRow {
106 final String name; 107 final String name;
107 final int time; 108 final int time;
108 final int count; 109 final int count;
109 _TaskRow(this.name, this.time, this.count); 110 _TaskRow(this.name, this.time, this.count);
110 111
111 Map toJson() => <String, dynamic>{'name': name, 'time': time, 'count': count}; 112 Map toJson() => <String, dynamic>{'name': name, 'time': time, 'count': count};
112 } 113 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698