From ed2c292f448f1a414db3f9473171dc88d1802eae Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 27 Mar 2017 23:23:45 -0700 Subject: [PATCH] Bugfix15 --- tools/profiling/microbenchmarks/bm_diff.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/profiling/microbenchmarks/bm_diff.py b/tools/profiling/microbenchmarks/bm_diff.py index 6b82cbe702d..fe8c76ba215 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'])