aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xtools/run_tests/run_microbenchmark.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/run_tests/run_microbenchmark.py b/tools/run_tests/run_microbenchmark.py
index 0d56e4c355..a9a563c1be 100755
--- a/tools/run_tests/run_microbenchmark.py
+++ b/tools/run_tests/run_microbenchmark.py
@@ -133,11 +133,9 @@ def collect_perf(bm_name, args):
'bins/mutrace/%s' % bm_name,
'--benchmark_filter=^%s$' % line,
'--benchmark_min_time=20'])
- with open('bm.perf', 'w') as f:
- f.write(subprocess.check_output(['sudo', 'perf', 'script', '-i', 'perf.data']))
- with open('bm.folded', 'w') as f:
- f.write(subprocess.check_output([
- '%s/stackcollapse-perf.pl' % flamegraph_dir, 'bm.perf']))
+ subprocess.check_call(['sudo', 'perf', 'script', '-i', 'perf.data', '>', 'bm.perf'], shell=True)
+ subprocess.check_call([
+ '%s/stackcollapse-perf.pl' % flamegraph_dir, 'bm.perf', '>', 'bm.folded'], shell=True)
link(line, '%s.svg' % fnize(line))
with open('reports/%s.svg' % fnize(line), 'w') as f:
f.write(subprocess.check_output([