diff options
author | Craig Tiller <ctiller@google.com> | 2017-03-27 23:23:45 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-03-27 23:23:45 -0700 |
commit | ed2c292f448f1a414db3f9473171dc88d1802eae (patch) | |
tree | 38be0b89603f3d866ac989658d814b88a4756183 /tools/profiling | |
parent | a87b138187d5127a4f193072f271ae2121b38a65 (diff) |
Bugfix15
Diffstat (limited to 'tools/profiling')
-rwxr-xr-x | tools/profiling/microbenchmarks/bm_diff.py | 8 |
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']) |