aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/profiling/microbenchmarks
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-04-14 08:31:17 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-04-14 08:31:17 -0700
commit0553b9c75d87394ebddb53722e11acaec2305810 (patch)
treef7d20d6267fdf6e3ce9ca56cde6275857227e4f5 /tools/profiling/microbenchmarks
parenta00e51ccfee3ca6877ef568c8a5d65867ce974ca (diff)
Properly clean
Diffstat (limited to 'tools/profiling/microbenchmarks')
-rwxr-xr-xtools/profiling/microbenchmarks/bm_diff.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/profiling/microbenchmarks/bm_diff.py b/tools/profiling/microbenchmarks/bm_diff.py
index 634e281446..d22a97fd1e 100755
--- a/tools/profiling/microbenchmarks/bm_diff.py
+++ b/tools/profiling/microbenchmarks/bm_diff.py
@@ -45,6 +45,7 @@ import jobset
import itertools
import speedup
import random
+import shutil
_INTERESTING = (
'cpu_time',
@@ -116,6 +117,7 @@ def make_cmd(cfg):
'CONFIG=%s' % cfg, '-j', '%d' % args.jobs]
def build(dest):
+ shutil.rmtree('bm_diff_%s' % dest, ignore_errors=True)
subprocess.check_call(['git', 'submodule', 'update'])
try:
subprocess.check_call(make_cmd('opt'))
@@ -124,10 +126,10 @@ def build(dest):
subprocess.check_call(['make', 'clean'])
subprocess.check_call(make_cmd('opt'))
subprocess.check_call(make_cmd('counters'))
- os.rename('bins', dest)
+ os.rename('bins', 'bm_diff_%s' % dest)
def collect1(bm, cfg, ver, idx):
- cmd = ['%s/%s/%s' % (ver, cfg, bm),
+ cmd = ['bm_diff_%s/%s/%s' % (ver, cfg, bm),
'--benchmark_out=%s.%s.%s.%d.json' % (bm, cfg, ver, idx),
'--benchmark_out_format=json',
'--benchmark_repetitions=%d' % (args.repetitions)