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

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

Issue 1090293003: Kill service_test.cc tests in favor of dart tests for the service protocol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix tests Created 5 years, 8 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/app.dart'; 9 import 'package:observatory/app.dart';
10 import 'package:observatory/service.dart'; 10 import 'package:observatory/service.dart';
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 classTable.sort(); 277 classTable.sort();
278 _updateClassTableInDom(); 278 _updateClassTableInDom();
279 } 279 }
280 } 280 }
281 281
282 void isolateChanged(oldValue) { 282 void isolateChanged(oldValue) {
283 if (isolate == null) { 283 if (isolate == null) {
284 profile = null; 284 profile = null;
285 return; 285 return;
286 } 286 }
287 isolate.invokeRpc('getAllocationProfile', {}).then(_update); 287 isolate.invokeRpc('_getAllocationProfile', {}).then(_update);
288 } 288 }
289 289
290 void refresh(var done) { 290 void refresh(var done) {
291 if (isolate == null) { 291 if (isolate == null) {
292 return; 292 return;
293 } 293 }
294 isolate.invokeRpc('getAllocationProfile', {}) 294 isolate.invokeRpc('_getAllocationProfile', {})
295 .then(_update).whenComplete(done); 295 .then(_update).whenComplete(done);
296 } 296 }
297 297
298 void refreshGC(var done) { 298 void refreshGC(var done) {
299 if (isolate == null) { 299 if (isolate == null) {
300 return; 300 return;
301 } 301 }
302 isolate.invokeRpc('getAllocationProfile', { 'gc': 'full' }) 302 isolate.invokeRpc('_getAllocationProfile', { 'gc': 'full' })
303 .then(_update).whenComplete(done); 303 .then(_update).whenComplete(done);
304 } 304 }
305 305
306 void resetAccumulator(var done) { 306 void resetAccumulator(var done) {
307 if (isolate == null) { 307 if (isolate == null) {
308 return; 308 return;
309 } 309 }
310 isolate.invokeRpc('getAllocationProfile', { 'reset': 'true' }) 310 isolate.invokeRpc('_getAllocationProfile', { 'reset': 'true' })
311 .then(_update).whenComplete(done); 311 .then(_update).whenComplete(done);
312 } 312 }
313 313
314 void _update(ServiceMap newProfile) { 314 void _update(ServiceMap newProfile) {
315 profile = newProfile; 315 profile = newProfile;
316 } 316 }
317 317
318 void profileChanged(oldValue) { 318 void profileChanged(oldValue) {
319 if (profile == null) { 319 if (profile == null) {
320 return; 320 return;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 } 358 }
359 359
360 @observable String formattedTotalCollectionTime(bool newSpace) { 360 @observable String formattedTotalCollectionTime(bool newSpace) {
361 if (profile == null) { 361 if (profile == null) {
362 return ''; 362 return '';
363 } 363 }
364 var heap = newSpace ? isolate.newSpace : isolate.oldSpace; 364 var heap = newSpace ? isolate.newSpace : isolate.oldSpace;
365 return '${Utils.formatSeconds(heap.totalCollectionTimeInSeconds)} secs'; 365 return '${Utils.formatSeconds(heap.totalCollectionTimeInSeconds)} secs';
366 } 366 }
367 } 367 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/heap_map.dart ('k') | runtime/observatory/lib/src/elements/object_common.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698