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')
|
|