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

Side by Side Diff: pkg/analysis_server/lib/src/status/get_handler.dart

Issue 2142593002: Tweak for the type of the 'instances' variable. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 | « no previous file | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 analysis_server.src.status.get_handler; 5 library analysis_server.src.status.get_handler;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:io'; 9 import 'dart:io';
10 import 'dart:math'; 10 import 'dart:math';
(...skipping 1641 matching lines...) Expand 10 before | Expand all | Expand 10 after
1652 }); 1652 });
1653 } 1653 }
1654 1654
1655 void _returnMemoryUsage(HttpRequest request) { 1655 void _returnMemoryUsage(HttpRequest request) {
1656 _writeResponse(request, (StringBuffer buffer) { 1656 _writeResponse(request, (StringBuffer buffer) {
1657 _writePage(buffer, 'Analysis Server - Memory Use', [], 1657 _writePage(buffer, 'Analysis Server - Memory Use', [],
1658 (StringBuffer buffer) { 1658 (StringBuffer buffer) {
1659 AnalysisServer server = _server.analysisServer; 1659 AnalysisServer server = _server.analysisServer;
1660 MemoryUseData data = new MemoryUseData(); 1660 MemoryUseData data = new MemoryUseData();
1661 data.processAnalysisServer(server); 1661 data.processAnalysisServer(server);
1662 Map<Type, HashSet> instances = data.instances; 1662 Map<Type, Set> instances = data.instances;
1663 List<Type> types = instances.keys.toList(); 1663 List<Type> types = instances.keys.toList();
1664 types.sort((Type left, Type right) => 1664 types.sort((Type left, Type right) =>
1665 left.toString().compareTo(right.toString())); 1665 left.toString().compareTo(right.toString()));
1666 1666
1667 buffer.write('<h3>Instance Counts (reachable from contexts)</h3>'); 1667 buffer.write('<h3>Instance Counts (reachable from contexts)</h3>');
1668 buffer.write('<table>'); 1668 buffer.write('<table>');
1669 _writeRow(buffer, ['Count', 'Class name'], header: true); 1669 _writeRow(buffer, ['Count', 'Class name'], header: true);
1670 types.forEach((Type type) { 1670 types.forEach((Type type) {
1671 _writeRow(buffer, [instances[type].length, type], 1671 _writeRow(buffer, [instances[type].length, type],
1672 classes: ['right', null]); 1672 classes: ['right', null]);
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
2709 */ 2709 */
2710 static String makeLink( 2710 static String makeLink(
2711 String path, Map<String, String> params, String innerHtml, 2711 String path, Map<String, String> params, String innerHtml,
2712 [bool hasError = false]) { 2712 [bool hasError = false]) {
2713 Uri uri = new Uri(path: path, queryParameters: params); 2713 Uri uri = new Uri(path: path, queryParameters: params);
2714 String href = HTML_ESCAPE.convert(uri.toString()); 2714 String href = HTML_ESCAPE.convert(uri.toString());
2715 String classAttribute = hasError ? ' class="error"' : ''; 2715 String classAttribute = hasError ? ' class="error"' : '';
2716 return '<a href="$href"$classAttribute>$innerHtml</a>'; 2716 return '<a href="$href"$classAttribute>$innerHtml</a>';
2717 } 2717 }
2718 } 2718 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698