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

Unified Diff: tools/callstats.py

Issue 2366523002: [tools] Add Group-Total-V8 category to callstats.py (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/callstats.py
diff --git a/tools/callstats.py b/tools/callstats.py
index 6339392733c2acf3f67e3575251762ce35760c1f..835662080702c3505271c51b2de8243ecb3c69f4 100755
--- a/tools/callstats.py
+++ b/tools/callstats.py
@@ -317,10 +317,10 @@ def read_stats(path, domain, args):
('Group-IC', re.compile(".*IC.*")),
('Group-Optimize',
re.compile("StackGuard|.*Optimize.*|.*Deoptimize.*|Recompile.*")),
- ('Group-Compile', re.compile(".*Compile.*")),
- ('Group-Parse', re.compile(".*Parse.*")),
- ('Group-Callback', re.compile(".*Callback.*")),
- ('Group-API', re.compile(".*API.*")),
+ ('Group-Compile', re.compile("Compile.*")),
+ ('Group-Parse', re.compile("Parse.*")),
+ ('Group-Callback', re.compile(".*Callback$")),
+ ('Group-API', re.compile("API.*")),
('Group-GC', re.compile("GC|AllocateInTargetSpace")),
('Group-JavaScript', re.compile("JS_Execution")),
('Group-Runtime', re.compile(".*"))]
@@ -355,8 +355,15 @@ def read_stats(path, domain, args):
entries[group_name]['time'] += time
entries[group_name]['count'] += count
break
+ # Calculate the V8-Total (all groups except Callback)
+ total_v8 = { 'time': 0, 'count': 0 }
+ for group_name, regexp in groups:
+ if group_name == 'Group-Callback': continue
+ total_v8['time'] += entries[group_name]['time']
+ total_v8['count'] += entries[group_name]['count']
+ entries['Group-Total-V8'] = total_v8
# Append the sums as single entries to domain.
- for key in entries :
+ for key in entries:
if key not in domain: domain[key] = { 'time_list': [], 'count_list': [] }
domain[key]['time_list'].append(entries[key]['time'])
domain[key]['count_list'].append(entries[key]['count'])
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698