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

Side by Side Diff: runtime/bin/vmservice/client/lib/src/elements/heap_profile.dart

Issue 196603009: Correct capacity reporting for new space; show external size in Observatory. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
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 heap_profile_element; 5 library heap_profile_element;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'observatory_element.dart'; 8 import 'observatory_element.dart';
9 import 'package:observatory/service.dart'; 9 import 'package:observatory/service.dart';
10 import 'package:logging/logging.dart'; 10 import 'package:logging/logging.dart';
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 _combinedTableColumnValue(cls, 2), 126 _combinedTableColumnValue(cls, 2),
127 _combinedTableColumnValue(cls, 3), 127 _combinedTableColumnValue(cls, 3),
128 _combinedTableColumnValue(cls, 4), 128 _combinedTableColumnValue(cls, 4),
129 _combinedTableColumnValue(cls, 5), 129 _combinedTableColumnValue(cls, 5),
130 _combinedTableColumnValue(cls, 6)]); 130 _combinedTableColumnValue(cls, 6)]);
131 } 131 }
132 _newPieDataTable.clearRows(); 132 _newPieDataTable.clearRows();
133 var heap = profile['heaps']['new']; 133 var heap = profile['heaps']['new'];
134 _newPieDataTable.addRow(['Used', heap['used']]); 134 _newPieDataTable.addRow(['Used', heap['used']]);
135 _newPieDataTable.addRow(['Free', heap['capacity'] - heap['used']]); 135 _newPieDataTable.addRow(['Free', heap['capacity'] - heap['used']]);
136 _newPieDataTable.addRow(['External', heap['external']]);
136 _oldPieDataTable.clearRows(); 137 _oldPieDataTable.clearRows();
137 heap = profile['heaps']['old']; 138 heap = profile['heaps']['old'];
138 _oldPieDataTable.addRow(['Used', heap['used']]); 139 _oldPieDataTable.addRow(['Used', heap['used']]);
139 _oldPieDataTable.addRow(['Free', heap['capacity'] - heap['used']]); 140 _oldPieDataTable.addRow(['Free', heap['capacity'] - heap['used']]);
141 _oldPieDataTable.addRow(['External', heap['external']]);
140 _draw(); 142 _draw();
141 } 143 }
142 144
143 void _draw() { 145 void _draw() {
144 if ((_fullChart == null) || (_combinedChart == null)) { 146 if ((_fullChart == null) || (_combinedChart == null)) {
145 return; 147 return;
146 } 148 }
147 _combinedChart.refreshOptionsSortInfo(); 149 _combinedChart.refreshOptionsSortInfo();
148 _combinedChart.draw(_combinedDataTable); 150 _combinedChart.draw(_combinedDataTable);
149 _fullChart.refreshOptionsSortInfo(); 151 _fullChart.refreshOptionsSortInfo();
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 278
277 @observable String formattedTotalCollectionTime(bool newSpace) { 279 @observable String formattedTotalCollectionTime(bool newSpace) {
278 if (profile == null) { 280 if (profile == null) {
279 return ''; 281 return '';
280 } 282 }
281 String space = newSpace ? 'new' : 'old'; 283 String space = newSpace ? 'new' : 'old';
282 Map heap = profile['heaps'][space]; 284 Map heap = profile['heaps'][space];
283 return '${formatSeconds(heap['time'])} secs'; 285 return '${formatSeconds(heap['time'])} secs';
284 } 286 }
285 } 287 }
OLDNEW
« no previous file with comments | « runtime/bin/vmservice/client/deployed/web/index_devtools.html_bootstrap.dart.js ('k') | runtime/vm/scavenger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698