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

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

Issue 1726773002: Refactor service tests in preparation of running on sky_shell (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | runtime/observatory/lib/src/elements/timeline_page.dart » ('j') | 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 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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/timeline_page.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698