Skip to content
Snippets Groups Projects
Commit 2ef0d54f authored by Craig Tiller's avatar Craig Tiller
Browse files

Handle one core

parent 360c0d50
No related branches found
No related tags found
No related merge requests found
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include <grpc/support/thd.h> #include <grpc/support/thd.h>
#include <grpc/support/time.h> #include <grpc/support/time.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include "src/core/lib/support/env.h" #include "src/core/lib/support/env.h"
......
...@@ -101,7 +101,7 @@ for bm_name in sys.argv[1:]: ...@@ -101,7 +101,7 @@ for bm_name in sys.argv[1:]:
if len(benchmarks) >= min(4, multiprocessing.cpu_count()): if len(benchmarks) >= min(4, multiprocessing.cpu_count()):
# run up to half the cpu count: each benchmark can use up to two cores # run up to half the cpu count: each benchmark can use up to two cores
# (one for the microbenchmark, one for the data flush) # (one for the microbenchmark, one for the data flush)
jobset.run(benchmarks, maxjobs=multiprocessing.cpu_count()/2, jobset.run(benchmarks, maxjobs=max(1, multiprocessing.cpu_count()/2),
add_env={'GRPC_TEST_PORT_SERVER': 'localhost:%d' % port_server_port}) add_env={'GRPC_TEST_PORT_SERVER': 'localhost:%d' % port_server_port})
jobset.run(profile_analysis, maxjobs=multiprocessing.cpu_count()) jobset.run(profile_analysis, maxjobs=multiprocessing.cpu_count())
jobset.run(cleanup, maxjobs=multiprocessing.cpu_count()) jobset.run(cleanup, maxjobs=multiprocessing.cpu_count())
...@@ -110,7 +110,7 @@ for bm_name in sys.argv[1:]: ...@@ -110,7 +110,7 @@ for bm_name in sys.argv[1:]:
cleanup = [] cleanup = []
# run the remaining benchmarks that weren't flushed # run the remaining benchmarks that weren't flushed
if len(benchmarks): if len(benchmarks):
jobset.run(benchmarks, maxjobs=multiprocessing.cpu_count()/2, jobset.run(benchmarks, maxjobs=max(1, multiprocessing.cpu_count()/2),
add_env={'GRPC_TEST_PORT_SERVER': 'localhost:%d' % port_server_port}) add_env={'GRPC_TEST_PORT_SERVER': 'localhost:%d' % port_server_port})
jobset.run(profile_analysis, maxjobs=multiprocessing.cpu_count()) jobset.run(profile_analysis, maxjobs=multiprocessing.cpu_count())
jobset.run(cleanup, maxjobs=multiprocessing.cpu_count()) jobset.run(cleanup, maxjobs=multiprocessing.cpu_count())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment