aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/profiling
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-03-27 23:23:45 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-03-27 23:23:45 -0700
commited2c292f448f1a414db3f9473171dc88d1802eae (patch)
tree38be0b89603f3d866ac989658d814b88a4756183 /tools/profiling
parenta87b138187d5127a4f193072f271ae2121b38a65 (diff)
Bugfix15
Diffstat (limited to 'tools/profiling')
-rwxr-xr-xtools/profiling/microbenchmarks/bm_diff.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/profiling/microbenchmarks/bm_diff.py b/tools/profiling/microbenchmarks/bm_diff.py
index 6b82cbe702..fe8c76ba21 100755
--- a/tools/profiling/microbenchmarks/bm_diff.py
+++ b/tools/profiling/microbenchmarks/bm_diff.py
@@ -85,6 +85,14 @@ args = argp.parse_args()
assert args.diff_base
+def avg(lst):
+ sum = 0
+ n = 0
+ for el in lst:
+ sum += el
+ n += 1
+ return sum / n
+
def collect1(bm, cfg, ver):
subprocess.check_call(['make', 'clean'])
subprocess.check_call(['git', 'submodule', 'update'])