From d5b389d401630ffef65886291f421ef074525f9e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 15 Feb 2017 11:25:50 -0800 Subject: [PATCH 1/3] Serialize running of perf, switch back to -f for consistent event counts --- tools/run_tests/run_microbenchmark.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/run_tests/run_microbenchmark.py b/tools/run_tests/run_microbenchmark.py index bda31f6b3d5..a2852546b37 100755 --- a/tools/run_tests/run_microbenchmark.py +++ b/tools/run_tests/run_microbenchmark.py @@ -134,7 +134,7 @@ def collect_perf(bm_name, args): link(line, '%s.svg' % fnize(line)) benchmarks.append( jobset.JobSpec(['perf', 'record', '-o', '%s-perf.data' % fnize(line), - '-g', '-c', '1000', + '-g', '-f', '997', 'bins/mutrace/%s' % bm_name, '--benchmark_filter=^%s$' % line, '--benchmark_min_time=10'])) @@ -152,7 +152,7 @@ def collect_perf(bm_name, args): if len(benchmarks) >= 20: # run up to half the cpu count: each benchmark can use up to two cores # (one for the microbenchmark, one for the data flush) - jobset.run(benchmarks, maxjobs=max(1, multiprocessing.cpu_count()/2), + jobset.run(benchmarks, maxjobs=1), add_env={'GRPC_TEST_PORT_SERVER': 'localhost:%d' % port_server_port}) jobset.run(profile_analysis, maxjobs=multiprocessing.cpu_count()) jobset.run(cleanup, maxjobs=multiprocessing.cpu_count()) @@ -161,7 +161,7 @@ def collect_perf(bm_name, args): cleanup = [] # run the remaining benchmarks that weren't flushed if len(benchmarks): - jobset.run(benchmarks, maxjobs=max(1, multiprocessing.cpu_count()/2), + jobset.run(benchmarks, maxjobs=1), add_env={'GRPC_TEST_PORT_SERVER': 'localhost:%d' % port_server_port}) jobset.run(profile_analysis, maxjobs=multiprocessing.cpu_count()) jobset.run(cleanup, maxjobs=multiprocessing.cpu_count()) From ab951947ce07336769682152880dd9eab2e03c80 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 15 Feb 2017 11:26:54 -0800 Subject: [PATCH 2/3] Syntax fix --- tools/run_tests/run_microbenchmark.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/run_tests/run_microbenchmark.py b/tools/run_tests/run_microbenchmark.py index a2852546b37..05a12332902 100755 --- a/tools/run_tests/run_microbenchmark.py +++ b/tools/run_tests/run_microbenchmark.py @@ -152,7 +152,7 @@ def collect_perf(bm_name, args): if len(benchmarks) >= 20: # run up to half the cpu count: each benchmark can use up to two cores # (one for the microbenchmark, one for the data flush) - jobset.run(benchmarks, maxjobs=1), + jobset.run(benchmarks, maxjobs=1, add_env={'GRPC_TEST_PORT_SERVER': 'localhost:%d' % port_server_port}) jobset.run(profile_analysis, maxjobs=multiprocessing.cpu_count()) jobset.run(cleanup, maxjobs=multiprocessing.cpu_count()) @@ -161,7 +161,7 @@ def collect_perf(bm_name, args): cleanup = [] # run the remaining benchmarks that weren't flushed if len(benchmarks): - jobset.run(benchmarks, maxjobs=1), + jobset.run(benchmarks, maxjobs=1, add_env={'GRPC_TEST_PORT_SERVER': 'localhost:%d' % port_server_port}) jobset.run(profile_analysis, maxjobs=multiprocessing.cpu_count()) jobset.run(cleanup, maxjobs=multiprocessing.cpu_count()) From c2c0c6f549df0428f817a19c9366919f88f5b32b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 15 Feb 2017 11:27:37 -0800 Subject: [PATCH 3/3] capitALization --- tools/run_tests/run_microbenchmark.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/run_microbenchmark.py b/tools/run_tests/run_microbenchmark.py index 05a12332902..4e60cce8688 100755 --- a/tools/run_tests/run_microbenchmark.py +++ b/tools/run_tests/run_microbenchmark.py @@ -134,7 +134,7 @@ def collect_perf(bm_name, args): link(line, '%s.svg' % fnize(line)) benchmarks.append( jobset.JobSpec(['perf', 'record', '-o', '%s-perf.data' % fnize(line), - '-g', '-f', '997', + '-g', '-F', '997', 'bins/mutrace/%s' % bm_name, '--benchmark_filter=^%s$' % line, '--benchmark_min_time=10']))