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

Side by Side Diff: runtime/bin/vmservice/client/lib/src/observatory/application.dart

Issue 148153007: Add Google Charts to Observatory and use it in allocation profiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 part of observatory; 5 part of observatory;
6 6
7 /// The observatory application. Instances of this are created and owned 7 /// The observatory application. Instances of this are created and owned
8 /// by the observatory_application custom element. 8 /// by the observatory_application custom element.
9 class ObservatoryApplication extends Observable { 9 class ObservatoryApplication extends Observable {
10 @observable final LocationManager locationManager; 10 @observable final LocationManager locationManager;
(...skipping 14 matching lines...) Expand all
25 requestManager = new PostMessageRequestManager(), 25 requestManager = new PostMessageRequestManager(),
26 isolateManager = new IsolateManager() { 26 isolateManager = new IsolateManager() {
27 _setup(); 27 _setup();
28 } 28 }
29 29
30 ObservatoryApplication() : 30 ObservatoryApplication() :
31 locationManager = new LocationManager(), 31 locationManager = new LocationManager(),
32 requestManager = new HttpRequestManager(), 32 requestManager = new HttpRequestManager(),
33 isolateManager = new IsolateManager() { 33 isolateManager = new IsolateManager() {
34 _setup(); 34 _setup();
35 Logger.root.level = Level.INFO;
36 Logger.root.onRecord.listen((LogRecord rec) {
37 print('${rec.level.name}: ${rec.time}: ${rec.message}');
38 });
39 } 35 }
40 36
41 /// Return the [Isolate] with [id]. 37 /// Return the [Isolate] with [id].
42 Isolate getIsolate(int id) { 38 Isolate getIsolate(int id) {
43 return isolateManager.isolates[id]; 39 return isolateManager.isolates[id];
44 } 40 }
45 41
46 /// Return the name of the isolate with [id]. 42 /// Return the name of the isolate with [id].
47 String getIsolateName(int id) { 43 String getIsolateName(int id) {
48 var isolate = getIsolate(id); 44 var isolate = getIsolate(id);
(...skipping 11 matching lines...) Expand all
60 return '${y.toStringAsFixed(1)} MB'; 56 return '${y.toStringAsFixed(1)} MB';
61 } else if (x > 2 * KB) { 57 } else if (x > 2 * KB) {
62 var y = x / KB; 58 var y = x / KB;
63 return '${y.toStringAsFixed(1)} KB'; 59 return '${y.toStringAsFixed(1)} KB';
64 } 60 }
65 var y = x.toDouble(); 61 var y = x.toDouble();
66 return '${y.toStringAsFixed(1)} B'; 62 return '${y.toStringAsFixed(1)} B';
67 } 63 }
68 64
69 static String timeUnits(double x) { 65 static String timeUnits(double x) {
70 return x.toStringAsFixed(4); 66 return x.toStringAsFixed(2);
71 } 67 }
72 } 68 }
OLDNEW
« no previous file with comments | « runtime/bin/vmservice/client/lib/observatory.dart ('k') | runtime/bin/vmservice/client/lib/src/observatory/chart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698