From 9421a27a76bc9f0100e2ad30f3e299fb9d2c0225 Mon Sep 17 00:00:00 2001 From: Yunjia Wang Date: Mon, 1 Jul 2019 15:45:01 -0700 Subject: [PATCH] Remove extra headers --- test/cpp/microbenchmarks/bm_threadpool.cc | 44 +++++++---------------- 1 file changed, 13 insertions(+), 31 deletions(-) diff --git a/test/cpp/microbenchmarks/bm_threadpool.cc b/test/cpp/microbenchmarks/bm_threadpool.cc index 9eef16a7026..2e68a298b15 100644 --- a/test/cpp/microbenchmarks/bm_threadpool.cc +++ b/test/cpp/microbenchmarks/bm_threadpool.cc @@ -16,22 +16,14 @@ * */ -#include "src/core/lib/iomgr/executor/threadpool.h" - -#include - #include -#include -#include -#include + #include -#include -#include + +#include "src/core/lib/iomgr/executor/threadpool.h" #include "test/cpp/microbenchmarks/helpers.h" #include "test/cpp/util/test_config.h" - - namespace grpc { namespace testing { @@ -122,26 +114,23 @@ static void BM_ThreadPool1AddAnother(benchmark::State& state) { } BENCHMARK(BM_ThreadPool1AddAnother) ->UseRealTime() - // ->Iterations(1) - // First pair is range for number of threads in pool, second paris is range + // First pair is range for number of threads in pool, second pair is range // for number of iterations - ->Ranges({{1, 1024}, {524288, 524288}}); // range = 2M ~ 4M + ->Ranges({{1, 1024}, {524288, 2097152}}); // 512K ~ 2M static void BM_ThreadPool4AddAnother(benchmark::State& state) { ThreadPoolAddAnotherHelper(state, 4); } BENCHMARK(BM_ThreadPool4AddAnother) ->UseRealTime() - // ->Iterations(1) - ->Ranges({{1, 1024}, {524288, 524288}}); // range = 256K ~ 512K + ->Ranges({{1, 1024}, {524288, 2097152}}); static void BM_ThreadPool8AddAnother(benchmark::State& state) { ThreadPoolAddAnotherHelper(state, 8); } BENCHMARK(BM_ThreadPool8AddAnother) ->UseRealTime() - // ->Iterations(1) - ->Ranges({{1, 1024}, {524288, 524288}}); + ->Ranges({{1, 1024}, {524288, 1048576}}); // 512K ~ 1M static void BM_ThreadPool16AddAnother(benchmark::State& state) { @@ -149,8 +138,7 @@ static void BM_ThreadPool16AddAnother(benchmark::State& state) { } BENCHMARK(BM_ThreadPool16AddAnother) ->UseRealTime() - // ->Iterations(1) - ->Ranges({{1, 1024}, {524288, 524288}}); + ->Ranges({{1, 1024}, {524288, 1048576}}); static void BM_ThreadPool32AddAnother(benchmark::State& state) { @@ -158,40 +146,35 @@ static void BM_ThreadPool32AddAnother(benchmark::State& state) { } BENCHMARK(BM_ThreadPool32AddAnother) ->UseRealTime() - // ->Iterations(1) - ->Ranges({{1, 1024}, {524288, 524288}}); + ->Ranges({{1, 1024}, {524288, 1048576}}); static void BM_ThreadPool64AddAnother(benchmark::State& state) { ThreadPoolAddAnotherHelper(state, 64); } BENCHMARK(BM_ThreadPool64AddAnother) ->UseRealTime() - // ->Iterations(1) - ->Ranges({{1, 1024}, {524288, 524288}}); + ->Ranges({{1, 1024}, {524288, 1048576}}); static void BM_ThreadPool128AddAnother(benchmark::State& state) { ThreadPoolAddAnotherHelper(state, 128); } BENCHMARK(BM_ThreadPool128AddAnother) ->UseRealTime() - // ->Iterations(1) - ->Ranges({{1, 1024}, {524288, 524288}}); + ->Ranges({{1, 1024}, {524288, 1048576}}); static void BM_ThreadPool512AddAnother(benchmark::State& state) { ThreadPoolAddAnotherHelper(state, 512); } BENCHMARK(BM_ThreadPool512AddAnother) ->UseRealTime() - // ->Iterations(1) - ->Ranges({{1, 1024}, {524288, 524288}}); + ->Ranges({{1, 1024}, {524288, 1048576}}); static void BM_ThreadPool2048AddAnother(benchmark::State& state) { ThreadPoolAddAnotherHelper(state, 2048); } BENCHMARK(BM_ThreadPool2048AddAnother) ->UseRealTime() - // ->Iterations(1) - ->Ranges({{1, 1024}, {524288, 524288}}); + ->Ranges({{1, 1024}, {524288, 1048576}}); // A functor class that will delete self on end of running. @@ -339,7 +322,6 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } int main(int argc, char** argv) { LibraryInitializer libInit; ::benchmark::Initialize(&argc, argv); - // gpr_set_log_verbosity(GPR_LOG_SEVERITY_DEBUG); ::grpc::testing::InitTest(&argc, &argv, false); benchmark::RunTheBenchmarksNamespaced(); return 0;