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

Side by Side Diff: pkg/analysis_server/tool/instrumentation/page/stats_page.dart

Issue 2952233002: Fix hints and clean-up obsolete comment syntax (TBR) (Closed)
Patch Set: Created 3 years, 5 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/analysis_server/test/services/completion/dart/completion_contributor_util.dart ('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 import '../log/log.dart'; 5 import '../log/log.dart';
6 import 'page_writer.dart'; 6 import 'page_writer.dart';
7 7
8 /** 8 /**
9 * A page writer that will produce the page containing statistics about an 9 * A page writer that will produce the page containing statistics about an
10 * instrumentation log. 10 * instrumentation log.
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 int _mean(List<int> values) { 82 int _mean(List<int> values) {
83 int sum = values.fold(0, (int sum, int latency) => sum + latency); 83 int sum = values.fold(0, (int sum, int latency) => sum + latency);
84 return sum ~/ values.length; 84 return sum ~/ values.length;
85 } 85 }
86 86
87 /** 87 /**
88 * Return a table mapping the kinds of the given [entries] to the number of 88 * Return a table mapping the kinds of the given [entries] to the number of
89 * each kind. 89 * each kind.
90 */ 90 */
91 void _processEntries(List<LogEntry> entries) { 91 void _processEntries(List<LogEntry> entries) {
92 void increment/*<K>*/(Map<dynamic/*=K*/, int> map, dynamic/*=K*/ key) { 92 void increment<K>(Map<K, int> map, K key) {
93 map[key] = (map[key] ?? 0) + 1; 93 map[key] = (map[key] ?? 0) + 1;
94 } 94 }
95 95
96 for (LogEntry entry in entries) { 96 for (LogEntry entry in entries) {
97 String kind = entry.kind; 97 String kind = entry.kind;
98 increment(entryCounts, kind); 98 increment(entryCounts, kind);
99 if (entry is ResponseEntry) { 99 if (entry is ResponseEntry) {
100 if (entry.result('error') != null) { 100 if (entry.result('error') != null) {
101 errorCount++; 101 errorCount++;
102 } 102 }
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 sink.write(responseTimes[responseTimes.length - 1]); 256 sink.write(responseTimes[responseTimes.length - 1]);
257 sink.write('</td><td>'); 257 sink.write('</td><td>');
258 sink.write(method); 258 sink.write(method);
259 sink.writeln('</td></tr>'); 259 sink.writeln('</td></tr>');
260 } 260 }
261 sink.writeln('</table>'); 261 sink.writeln('</table>');
262 }); 262 });
263 } 263 }
264 } 264 }
265 } 265 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698