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

Unified Diff: runtime/bin/vmstats/vmstats.dart

Issue 18611003: Remove VM Stats (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/vmstats/vmstats.css ('k') | runtime/bin/vmstats/vmstats.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/vmstats/vmstats.dart
diff --git a/runtime/bin/vmstats/vmstats.dart b/runtime/bin/vmstats/vmstats.dart
deleted file mode 100644
index 9cc43c5fce29211c7a9f00442c907079ce03f506..0000000000000000000000000000000000000000
--- a/runtime/bin/vmstats/vmstats.dart
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library dart.vmstats;
-
-import 'dart:async';
-import 'dart:html';
-import 'dart:json' as JSON;
-
-part 'bargraph.dart';
-part 'isolate_list.dart';
-part 'models.dart';
-
-BarGraph _graph;
-IsolateList _isolateList;
-DivElement _statusText;
-IsolateListModel _isolates;
-Timer _updater;
-
-final int _POLL_INTERVAL = const Duration(seconds: 3);
-final String CYAN = '#00EE76';
-final String GREEN = '#97FFFF';
-
-void main() {
- DivElement dashBoard = query('#dashboard');
- CanvasElement canvas = query('#graph');
- var elements = [ new Element("Old Space", GREEN),
- new Element("New Space", CYAN)];
- _graph = new BarGraph(canvas, elements);
- _isolateList = new IsolateList(query('#isolateList'));
- _statusText = query('#statusText');
-
- _isolates = new IsolateListModel();
- _isolates.addListener(onUpdateStatus, onRequestFailed);
- _isolates.update();
- _updater = new Timer.periodic(_POLL_INTERVAL, (timer) => _isolates.update());
-}
-
-void onUpdateStatus(IsolateListModel model) {
- int oldSpace = 0;
- int newSpace = 0;
- model.forEach((Isolate element) {
- oldSpace += element.oldSpace.used;
- newSpace += element.newSpace.used;
- });
- _graph.addSample([oldSpace, newSpace]);
- _isolateList.updateList(model);
- showStatus('Running ...');
-}
-
-void onRequestFailed() {
- _updater.cancel();
- _isolates.removeListener(onUpdateStatus);
- showStatus('Server closed');
-}
-
-void showStatus(status) {
- _statusText.text = status;
-}
« no previous file with comments | « runtime/bin/vmstats/vmstats.css ('k') | runtime/bin/vmstats/vmstats.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698