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

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

Issue 2840703002: Refactoring analyzer_cli for code hygiene. (Closed)
Patch Set: Created 3 years, 8 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/analyzer_options.dart' show CommandLineOptions;
13 import 'package:analyzer_cli/src/error_formatter.dart'; 14 import 'package:analyzer_cli/src/error_formatter.dart';
14 import 'package:analyzer_cli/src/options.dart' show CommandLineOptions;
15 15
16 const _JSON = const JsonEncoder.withIndent(" "); 16 const _JSON = const JsonEncoder.withIndent(" ");
17 17
18 bool _isCheckedMode = () { 18 bool _isCheckedMode = () {
19 bool x = true; 19 bool x = true;
20 try { 20 try {
21 // Trigger an exception if we're in checked mode. 21 // Trigger an exception if we're in checked mode.
22 x = "" as dynamic; 22 x = "" as dynamic;
23 return x != ""; // return false; suppress unused variable warning 23 return x != ""; // return false; suppress unused variable warning
24 } catch (e) { 24 } catch (e) {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 103 }
104 104
105 class _TaskRow { 105 class _TaskRow {
106 final String name; 106 final String name;
107 final int time; 107 final int time;
108 final int count; 108 final int count;
109 _TaskRow(this.name, this.time, this.count); 109 _TaskRow(this.name, this.time, this.count);
110 110
111 Map toJson() => <String, dynamic>{'name': name, 'time': time, 'count': count}; 111 Map toJson() => <String, dynamic>{'name': name, 'time': time, 'count': count};
112 } 112 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698