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

Side by Side Diff: webrtc/analyze_results.py

Issue 1371113004: Debugging perf regression after refactoring (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Adding analyze_results.py Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/video/full_stack.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 from collections import defaultdict
2 import re
3
4 f = open("mac_same.txt")
5 field = 'media_bitrate'
6
7 sum_x = defaultdict(float)
8 sum_xx = defaultdict(float)
9 cnt = defaultdict(int)
10
11 for line in f:
12 line = line.strip()
13 if line.startswith('[ RUN'):
14 test = line[line.find('.') + 1:-2]
15 if line.startswith('RESULT ' + field):
16 avg = re.search('([\d.]+)', line)
17 avg = float(avg.group(1))
18 sum_x[test] += avg
19 sum_xx[test] += avg * avg
20 cnt[test] += 1
21
22 f.close()
23
24 for test in sorted(sum_x.keys()):
25 avg_x = sum_x[test] / cnt[test]
26 avg_xx = sum_xx[test] / cnt[test]
27 print "{:43} {:.1f} +- {:.1f} (n={})".format(
28 test, avg_x, (avg_xx - avg_x * avg_x) ** 0.5, cnt[test])
29
30 def show_change(test_prefix):
31 master = sum_x[test_prefix + '_Master']
32 mod = sum_x[test_prefix + '_Mod']
33 before = sum_x[test_prefix + '_Before']
34 print "{:30} master: {:4.1f}% mod: {:4.1f}".format(
35 test_prefix,
36 (master / before - 1.) * 100,
37 (mod / before - 1.) * 100)
38
39 print
40 print "Increase after the new patch:"
41 show_change('ScreenshareSlidesVP8_2TL')
OLDNEW
« no previous file with comments | « no previous file | webrtc/video/full_stack.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698