diff options
author | 2017-02-13 19:31:49 -0800 | |
---|---|---|
committer | 2017-02-13 19:31:49 -0800 | |
commit | a48e6904985754c4364d95fa51675a11ce670102 (patch) | |
tree | 35b384ead08a48f6da16e9b395402122050de2d1 /tools | |
parent | 4e8b136faf01891d46f1112318bd51743999c0e5 (diff) |
Use shell to redirect a few big files
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/run_tests/run_microbenchmark.py | 8 |
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([ |