| 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:charted/charted.dart'; | 10 import 'package:charted/charted.dart'; |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 if (refreshAutoQueued) { | 149 if (refreshAutoQueued) { |
| 150 refreshAuto(); | 150 refreshAuto(); |
| 151 } | 151 } |
| 152 }).catchError(app.handleException); | 152 }).catchError(app.handleException); |
| 153 } | 153 } |
| 154 | 154 |
| 155 static const _USED_INDEX = 0; | 155 static const _USED_INDEX = 0; |
| 156 static const _FREE_INDEX = 1; | 156 static const _FREE_INDEX = 1; |
| 157 static const _EXTERNAL_INDEX = 2; | 157 static const _EXTERNAL_INDEX = 2; |
| 158 | 158 |
| 159 static const _LABEL_INDEX = 0; | |
| 160 static const _VALUE_INDEX = 1; | 159 static const _VALUE_INDEX = 1; |
| 161 | 160 |
| 162 void _initPieChartData(List rows) { | 161 void _initPieChartData(List rows) { |
| 163 rows.add(['Used', 0]); | 162 rows.add(['Used', 0]); |
| 164 rows.add(['Free', 0]); | 163 rows.add(['Free', 0]); |
| 165 rows.add(['External', 0]); | 164 rows.add(['External', 0]); |
| 166 } | 165 } |
| 167 | 166 |
| 168 void _updatePieChartData(List rows, HeapSpace space) { | 167 void _updatePieChartData(List rows, HeapSpace space) { |
| 169 rows[_USED_INDEX][_VALUE_INDEX] = space.used; | 168 rows[_USED_INDEX][_VALUE_INDEX] = space.used; |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 } | 396 } |
| 398 | 397 |
| 399 @observable String formattedTotalCollectionTime(bool newSpace) { | 398 @observable String formattedTotalCollectionTime(bool newSpace) { |
| 400 if (profile == null) { | 399 if (profile == null) { |
| 401 return ''; | 400 return ''; |
| 402 } | 401 } |
| 403 var heap = newSpace ? isolate.newSpace : isolate.oldSpace; | 402 var heap = newSpace ? isolate.newSpace : isolate.oldSpace; |
| 404 return '${Utils.formatSeconds(heap.totalCollectionTimeInSeconds)} secs'; | 403 return '${Utils.formatSeconds(heap.totalCollectionTimeInSeconds)} secs'; |
| 405 } | 404 } |
| 406 } | 405 } |
| OLD | NEW |