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

Side by Side Diff: runtime/observatory/lib/src/elements/heap_profile.dart

Issue 2204973003: Converted Observatory class-ref & library-ref elements (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fixed indentation Created 4 years, 4 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) 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:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'class_ref_wrapper.dart';
9 import 'observatory_element.dart'; 10 import 'observatory_element.dart';
10 import 'package:charted/charted.dart'; 11 import 'package:charted/charted.dart';
11 import 'package:observatory/app.dart'; 12 import 'package:observatory/app.dart';
12 import 'package:observatory/service.dart'; 13 import 'package:observatory/service.dart';
13 import 'package:observatory/elements.dart'; 14 import 'package:observatory/elements.dart';
14 import 'package:polymer/polymer.dart'; 15 import 'package:polymer/polymer.dart';
15 16
16 class ClassSortedTable extends SortedTable { 17 class ClassSortedTable extends SortedTable {
17 18
18 ClassSortedTable(columns) : super(columns); 19 ClassSortedTable(columns) : super(columns);
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 246
246 // Add row to table. 247 // Add row to table.
247 _classTableBody.children.add(tr); 248 _classTableBody.children.add(tr);
248 } 249 }
249 250
250 void _fillClassTableDomRow(TableRowElement tr, int rowIndex) { 251 void _fillClassTableDomRow(TableRowElement tr, int rowIndex) {
251 const SPACER_COLUMNS = const [1, 6]; 252 const SPACER_COLUMNS = const [1, 6];
252 253
253 var row = classTable.rows[rowIndex]; 254 var row = classTable.rows[rowIndex];
254 // Add class ref. 255 // Add class ref.
255 ClassRefElement classRef = tr.children[0].children[0]; 256 ClassRefElementWrapper classRef = tr.children[0].children[0];
256 classRef.ref = row.values[0]; 257 classRef.ref = row.values[0];
257 258
258 for (var i = 1; i < row.values.length; i++) { 259 for (var i = 1; i < row.values.length; i++) {
259 if (SPACER_COLUMNS.contains(i)) { 260 if (SPACER_COLUMNS.contains(i)) {
260 // Skip spacer columns. 261 // Skip spacer columns.
261 continue; 262 continue;
262 } 263 }
263 var cell = tr.children[i]; 264 var cell = tr.children[i];
264 cell.title = row.values[i].toString(); 265 cell.title = row.values[i].toString();
265 cell.text = classTable.getFormattedValue(rowIndex, i); 266 cell.text = classTable.getFormattedValue(rowIndex, i);
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 } 397 }
397 398
398 @observable String formattedTotalCollectionTime(bool newSpace) { 399 @observable String formattedTotalCollectionTime(bool newSpace) {
399 if (profile == null) { 400 if (profile == null) {
400 return ''; 401 return '';
401 } 402 }
402 var heap = newSpace ? isolate.newSpace : isolate.oldSpace; 403 var heap = newSpace ? isolate.newSpace : isolate.oldSpace;
403 return '${Utils.formatSeconds(heap.totalCollectionTimeInSeconds)} secs'; 404 return '${Utils.formatSeconds(heap.totalCollectionTimeInSeconds)} secs';
404 } 405 }
405 } 406 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/heap_map.html ('k') | runtime/observatory/lib/src/elements/heap_profile.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698