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

Unified Diff: runtime/observatory/lib/object_graph.dart

Issue 2266343002: Converted Observatory heap-snapshot element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Removed debug code Created 4 years, 4 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/observatory/lib/models.dart ('k') | runtime/observatory/lib/repositories.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/object_graph.dart
diff --git a/runtime/observatory/lib/object_graph.dart b/runtime/observatory/lib/object_graph.dart
index 8b491e81c3003787d6d3e9b112b36a468e6cc191..ce6ff65fd53aa2f29edbd40182da49949b693d6d 100644
--- a/runtime/observatory/lib/object_graph.dart
+++ b/runtime/observatory/lib/object_graph.dart
@@ -362,41 +362,45 @@ class ObjectGraph {
return result;
}
- Future process(statusReporter) async {
- // We build futures here instead of marking the steps as async to avoid the
- // heavy lifting being inside a transformed method.
+ Stream<List> process() {
+ final controller = new StreamController<List>.broadcast();
+ (() async {
+ // We build futures here instead of marking the steps as async to avoid the
+ // heavy lifting being inside a transformed method.
- statusReporter.add("Remapping $_N objects...");
- await new Future(() => _remapNodes());
+ controller.add(["Remapping $_N objects...", 0.0]);
+ await new Future(() => _remapNodes());
- statusReporter.add("Remapping $_E references...");
- await new Future(() => _remapEdges());
+ controller.add(["Remapping $_E references...", 15.0]);
+ await new Future(() => _remapEdges());
- _addrToId = null;
- _chunks = null;
+ _addrToId = null;
+ _chunks = null;
- statusReporter.add("Finding depth-first order...");
- await new Future(() => _dfs());
+ controller.add(["Finding depth-first order...", 30.0]);
+ await new Future(() => _dfs());
- statusReporter.add("Finding predecessors...");
- await new Future(() => _buildPredecessors());
+ controller.add(["Finding predecessors...", 45.0]);
+ await new Future(() => _buildPredecessors());
- statusReporter.add("Finding dominators...");
- await new Future(() => _buildDominators());
+ controller.add(["Finding dominators...", 60.0]);
+ await new Future(() => _buildDominators());
- _firstPreds = null;
- _preds = null;
+ _firstPreds = null;
+ _preds = null;
- _semi = null;
- _parent = null;
+ _semi = null;
+ _parent = null;
- statusReporter.add("Finding retained sizes...");
- await new Future(() => _calculateRetainedSizes());
+ controller.add(["Finding retained sizes...", 75.0]);
+ await new Future(() => _calculateRetainedSizes());
- _vertex = null;
+ _vertex = null;
- statusReporter.add("Loaded");
- return this;
+ controller.add(["Loaded", 100.0]);
+ controller.close();
+ }());
+ return controller.stream;
}
List<ByteData> _chunks;
« no previous file with comments | « runtime/observatory/lib/models.dart ('k') | runtime/observatory/lib/repositories.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698