aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/profiling/microbenchmarks/bm_diff.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/profiling/microbenchmarks/bm_diff.py')
-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'])