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

Unified Diff: tools/callstats.html

Issue 2555693007: [tools] Properly match Group-Compile in RuntimeCallStats (Closed)
Patch Set: Created 4 years 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 | « no previous file | tools/callstats.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/callstats.html
diff --git a/tools/callstats.html b/tools/callstats.html
index 741b9ef07811d1033167bec009d847415b094448..c2441428b3eeecac32c622c2e7bd53cb7a1dd59f 100644
--- a/tools/callstats.html
+++ b/tools/callstats.html
@@ -1103,7 +1103,23 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
return result;
}
+ function fixSinglePageJSON(json) {
+ // Try to detect the single-version case, where we're missing the toplevel
+ // version object. The incoming JSON is of the form:
+ // {"Page 1": [... data points ... ], "Page 2": [...], ...}
+ // Instead of the default multi-page JSON:
+ // {"Version 1": { "Page 1": ..., ...}, "Version 2": {...}, ...}
+ // In this case insert a single "Default" version as top-level entry.
+ var firstProperty = (object) => {
+ for (var key in object) return key;
+ };
+ var maybePage = json[firstProperty(json)];
+ if (!Array.isArray(maybePage)) return json;
+ return {"Default": json}
+ }
+
function handleLoadJSON(json) {
+ json = fixSinglePageJSON(json);
var state = getStateFromParams();
pages = new Pages();
versions = Versions.fromJSON(json);
@@ -1632,10 +1648,11 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
return group;
}
Group.add('total', new Group('Total', /.*Total.*/, '#BBB'));
- Group.add('ic', new Group('IC', /.*IC.*/, "#3366CC"));
+ Group.add('ic', new Group('IC', /.*IC_.*/, "#3366CC"));
Group.add('optimize', new Group('Optimize',
/StackGuard|.*Optimize.*|.*Deoptimize.*|Recompile.*/, "#DC3912"));
- Group.add('compile', new Group('Compile', /.*Compile.*/, "#FFAA00"));
+ Group.add('compile', new Group('Compile',
+ /(^Compile.*)|(.*_Compile.*)/, "#FFAA00"));
Group.add('parse-background',
new Group('Parse-Background', /.*ParseBackground.*/, "#af744d"));
Group.add('parse', new Group('Parse', /.*Parse.*/, "#FF6600"));
« no previous file with comments | « no previous file | tools/callstats.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698