diff options
author | Craig Tiller <ctiller@google.com> | 2017-03-01 14:00:51 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-03-01 14:00:51 -0800 |
commit | 18a948ad2f1b76416211d9aadc07887601e9eac1 (patch) | |
tree | f447463bb3497720b7983b89cfef1cf7f31ad2f2 /tools/run_tests/run_microbenchmark.py | |
parent | d753f45cf3ebb429ebb72fcc50f6952cbc5375db (diff) | |
parent | 07ad1b9c7c785554b6734eb5c0e2fcd2b14691b2 (diff) |
Merge github.com:grpc/grpc into diff_perf
Diffstat (limited to 'tools/run_tests/run_microbenchmark.py')
-rwxr-xr-x | tools/run_tests/run_microbenchmark.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/tools/run_tests/run_microbenchmark.py b/tools/run_tests/run_microbenchmark.py index d274240d67..e045b4aafd 100755 --- a/tools/run_tests/run_microbenchmark.py +++ b/tools/run_tests/run_microbenchmark.py @@ -170,20 +170,25 @@ def collect_perf(bm_name, args): jobset.run(profile_analysis, maxjobs=multiprocessing.cpu_count()) jobset.run(cleanup, maxjobs=multiprocessing.cpu_count()) -def collect_summary(bm_name, args): - heading('Summary: %s' % bm_name) +def run_summary(cfg): subprocess.check_call( ['make', bm_name, - 'CONFIG=counters', '-j', '%d' % multiprocessing.cpu_count()]) - cmd = ['bins/counters/%s' % bm_name, - '--benchmark_out=out.json', + 'CONFIG=%s' % cfg, '-j', '%d' % multiprocessing.cpu_count()]) + cmd = ['bins/%s/%s' % (cfg, bm_name), + '--benchmark_out=out.%s.json' % cfg, '--benchmark_out_format=json'] if args.summary_time is not None: cmd += ['--benchmark_min_time=%d' % args.summary_time] - text(subprocess.check_output(cmd)) + return subprocess.check_output(cmd) + +def collect_summary(bm_name, args): + heading('Summary: %s [no counters]' % bm_name) + text(run_summary('opt')) + heading('Summary: %s [with counters]' % bm_name) + text(run_summary('counters')) if args.bigquery_upload: with open('out.csv', 'w') as f: - f.write(subprocess.check_output(['tools/profiling/microbenchmarks/bm2bq.py', 'out.json'])) + f.write(subprocess.check_output(['tools/profiling/microbenchmarks/bm2bq.py', 'out.counters.json', 'out.opt.json'])) subprocess.check_call(['bq', 'load', 'microbenchmarks.microbenchmarks', 'out.csv']) collectors = { |