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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/video/full_stack.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/analyze_results.py
diff --git a/webrtc/analyze_results.py b/webrtc/analyze_results.py
new file mode 100644
index 0000000000000000000000000000000000000000..0c4d178a2e2d73ab8ec5be9fcfa64c41df373795
--- /dev/null
+++ b/webrtc/analyze_results.py
@@ -0,0 +1,41 @@
+from collections import defaultdict
+import re
+
+f = open("mac_same.txt")
+field = 'media_bitrate'
+
+sum_x = defaultdict(float)
+sum_xx = defaultdict(float)
+cnt = defaultdict(int)
+
+for line in f:
+ line = line.strip()
+ if line.startswith('[ RUN'):
+ test = line[line.find('.') + 1:-2]
+ if line.startswith('RESULT ' + field):
+ avg = re.search('([\d.]+)', line)
+ avg = float(avg.group(1))
+ sum_x[test] += avg
+ sum_xx[test] += avg * avg
+ cnt[test] += 1
+
+f.close()
+
+for test in sorted(sum_x.keys()):
+ avg_x = sum_x[test] / cnt[test]
+ avg_xx = sum_xx[test] / cnt[test]
+ print "{:43} {:.1f} +- {:.1f} (n={})".format(
+ test, avg_x, (avg_xx - avg_x * avg_x) ** 0.5, cnt[test])
+
+def show_change(test_prefix):
+ master = sum_x[test_prefix + '_Master']
+ mod = sum_x[test_prefix + '_Mod']
+ before = sum_x[test_prefix + '_Before']
+ print "{:30} master: {:4.1f}% mod: {:4.1f}".format(
+ test_prefix,
+ (master / before - 1.) * 100,
+ (mod / before - 1.) * 100)
+
+print
+print "Increase after the new patch:"
+show_change('ScreenshareSlidesVP8_2TL')
« 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