| OLD | NEW |
| 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 'observatory_element.dart'; | 9 import 'observatory_element.dart'; |
| 10 import 'package:observatory/app.dart'; | 10 import 'package:observatory/app.dart'; |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 for (var i = 1; i < row.values.length; i++) { | 228 for (var i = 1; i < row.values.length; i++) { |
| 229 if (SPACER_COLUMNS.contains(i)) { | 229 if (SPACER_COLUMNS.contains(i)) { |
| 230 // Skip spacer columns. | 230 // Skip spacer columns. |
| 231 continue; | 231 continue; |
| 232 } | 232 } |
| 233 var cell = tr.children[i]; | 233 var cell = tr.children[i]; |
| 234 cell.title = row.values[i].toString(); | 234 cell.title = row.values[i].toString(); |
| 235 cell.text = classTable.getFormattedValue(rowIndex, i); | 235 cell.text = classTable.getFormattedValue(rowIndex, i); |
| 236 if (i > 1) { // Numbers. | 236 if (i > 1) { // Numbers. |
| 237 cell.style.textAlign = 'right'; | 237 cell.style.textAlign = 'right'; |
| 238 cell.style.paddingLeft = '1em'; |
| 238 } | 239 } |
| 239 } | 240 } |
| 240 } | 241 } |
| 241 | 242 |
| 242 void _updateClassTableInDom() { | 243 void _updateClassTableInDom() { |
| 243 assert(_classTableBody != null); | 244 assert(_classTableBody != null); |
| 244 // Resize DOM table. | 245 // Resize DOM table. |
| 245 if (_classTableBody.children.length > classTable.sortedRows.length) { | 246 if (_classTableBody.children.length > classTable.sortedRows.length) { |
| 246 // Shrink the table. | 247 // Shrink the table. |
| 247 var deadRows = | 248 var deadRows = |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 } | 366 } |
| 366 | 367 |
| 367 @observable String formattedTotalCollectionTime(bool newSpace) { | 368 @observable String formattedTotalCollectionTime(bool newSpace) { |
| 368 if (profile == null) { | 369 if (profile == null) { |
| 369 return ''; | 370 return ''; |
| 370 } | 371 } |
| 371 var heap = newSpace ? isolate.newSpace : isolate.oldSpace; | 372 var heap = newSpace ? isolate.newSpace : isolate.oldSpace; |
| 372 return '${Utils.formatSeconds(heap.totalCollectionTimeInSeconds)} secs'; | 373 return '${Utils.formatSeconds(heap.totalCollectionTimeInSeconds)} secs'; |
| 373 } | 374 } |
| 374 } | 375 } |
| OLD | NEW |