Permalink
Browse files

Adds getTopDownRoot() and getBottomUpRoot() functions to the CPU prof…

…iler
  • Loading branch information...
c4milo committed Apr 5, 2012
1 parent 1e0c839 commit 314ab6c1ecb76807cd5a0adb117c83ae771099d3
Showing with 7 additions and 3 deletions.
  1. +7 −3 v8-profiler.js
View
@@ -163,9 +163,13 @@ function inspectorObjectFor(node) {
return result;
}
-CpuProfile.prototype.stringify = function() {
- return JSON.stringify(inspectorObjectFor(this.topRoot));
-}
+CpuProfile.prototype.getTopDownRoot = function() {
+ return inspectorObjectFor(this.topRoot);
+};
+
+CpuProfile.prototype.getBottomUpRoot = function() {
+ return inspectorObjectFor(this.bottomRoot);
+};
var heapCache = [];

0 comments on commit 314ab6c

Please sign in to comment.