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

Side by Side Diff: tools/callstats.py

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 unified diff | Download patch
« no previous file with comments | « tools/callstats.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2016 the V8 project authors. All rights reserved. 2 # Copyright 2016 the V8 project authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 ''' 5 '''
6 Usage: callstats.py [-h] <command> ... 6 Usage: callstats.py [-h] <command> ...
7 7
8 Optional arguments: 8 Optional arguments:
9 -h, --help show this help message and exit 9 -h, --help show this help message and exit
10 10
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 else: 336 else:
337 ci['perc'] = 0 337 ci['perc'] = 0
338 return { 'samples': N, 'average': average, 'median': median, 338 return { 'samples': N, 'average': average, 'median': median,
339 'stddev': stddev, 'min': low, 'max': high, 'ci': ci } 339 'stddev': stddev, 'min': low, 'max': high, 'ci': ci }
340 340
341 341
342 def read_stats(path, domain, args): 342 def read_stats(path, domain, args):
343 groups = []; 343 groups = [];
344 if args.aggregate: 344 if args.aggregate:
345 groups = [ 345 groups = [
346 ('Group-IC', re.compile(".*IC.*")), 346 ('Group-IC', re.compile(".*IC_.*")),
347 ('Group-Optimize', 347 ('Group-Optimize',
348 re.compile("StackGuard|.*Optimize.*|.*Deoptimize.*|Recompile.*")), 348 re.compile("StackGuard|.*Optimize.*|.*Deoptimize.*|Recompile.*")),
349 ('Group-Compile', re.compile(".*Compile.*")), 349 ('Group-Compile', re.compile("(^Compile.*)|(.*_Compile.*)")),
350 ('Group-ParseBackground', re.compile(".*ParseBackground.*")), 350 ('Group-ParseBackground', re.compile(".*ParseBackground.*")),
351 ('Group-Parse', re.compile(".*Parse.*")), 351 ('Group-Parse', re.compile(".*Parse.*")),
352 ('Group-Callback', re.compile(".*Callback.*")), 352 ('Group-Callback', re.compile(".*Callback.*")),
353 ('Group-API', re.compile(".*API.*")), 353 ('Group-API', re.compile(".*API.*")),
354 ('Group-GC', re.compile("GC|AllocateInTargetSpace")), 354 ('Group-GC', re.compile("GC|AllocateInTargetSpace")),
355 ('Group-JavaScript', re.compile("JS_Execution")), 355 ('Group-JavaScript', re.compile("JS_Execution")),
356 ('Group-Runtime', re.compile(".*"))] 356 ('Group-Runtime', re.compile(".*"))]
357 with open(path, "rt") as f: 357 with open(path, "rt") as f:
358 # Process the whole file and sum repeating entries. 358 # Process the whole file and sum repeating entries.
359 entries = { 'Sum': {'time': 0, 'count': 0} } 359 entries = { 'Sum': {'time': 0, 'count': 0} }
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 args.error("use either option --sites-file or site URLs") 688 args.error("use either option --sites-file or site URLs")
689 sys.exit(1) 689 sys.exit(1)
690 elif args.command == "run" and not coexist(args.replay_wpr, args.replay_bin): 690 elif args.command == "run" and not coexist(args.replay_wpr, args.replay_bin):
691 args.error("options --replay-wpr and --replay-bin must be used together") 691 args.error("options --replay-wpr and --replay-bin must be used together")
692 sys.exit(1) 692 sys.exit(1)
693 else: 693 else:
694 args.func(args) 694 args.func(args)
695 695
696 if __name__ == "__main__": 696 if __name__ == "__main__":
697 sys.exit(main()) 697 sys.exit(main())
OLDNEW
« no previous file with comments | « tools/callstats.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698