Skip to content

Commit a9ed516

Browse files
camillobruniCommit bot
authored andcommitted
[tools] Add Group-Total-V8 category to callstats.py
Group-Total-V8 contains all but Group-Callback times which should lead to more stable data. R=hablich@chromium.org NOTRY=true BUG= Review-Url: https://codereview.chromium.org/2366523002 Cr-Commit-Position: refs/heads/master@{#39668}
1 parent 639e8fa commit a9ed516

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

tools/callstats.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,10 @@ def read_stats(path, domain, args):
317317
('Group-IC', re.compile(".*IC.*")),
318318
('Group-Optimize',
319319
re.compile("StackGuard|.*Optimize.*|.*Deoptimize.*|Recompile.*")),
320-
('Group-Compile', re.compile(".*Compile.*")),
321-
('Group-Parse', re.compile(".*Parse.*")),
322-
('Group-Callback', re.compile(".*Callback.*")),
323-
('Group-API', re.compile(".*API.*")),
320+
('Group-Compile', re.compile("Compile.*")),
321+
('Group-Parse', re.compile("Parse.*")),
322+
('Group-Callback', re.compile(".*Callback$")),
323+
('Group-API', re.compile("API.*")),
324324
('Group-GC', re.compile("GC|AllocateInTargetSpace")),
325325
('Group-JavaScript', re.compile("JS_Execution")),
326326
('Group-Runtime', re.compile(".*"))]
@@ -355,8 +355,15 @@ def read_stats(path, domain, args):
355355
entries[group_name]['time'] += time
356356
entries[group_name]['count'] += count
357357
break
358+
# Calculate the V8-Total (all groups except Callback)
359+
total_v8 = { 'time': 0, 'count': 0 }
360+
for group_name, regexp in groups:
361+
if group_name == 'Group-Callback': continue
362+
total_v8['time'] += entries[group_name]['time']
363+
total_v8['count'] += entries[group_name]['count']
364+
entries['Group-Total-V8'] = total_v8
358365
# Append the sums as single entries to domain.
359-
for key in entries :
366+
for key in entries:
360367
if key not in domain: domain[key] = { 'time_list': [], 'count_list': [] }
361368
domain[key]['time_list'].append(entries[key]['time'])
362369
domain[key]['count_list'].append(entries[key]['count'])

0 commit comments

Comments
 (0)