SpikyLoad: construct outside

pull/19695/head
Yunjia Wang 6 years ago
parent c3c24d089d
commit 8318e578db
  1. 2
      test/cpp/microbenchmarks/bm_threadpool.cc

@ -291,8 +291,8 @@ static void BM_SpikyLoad(benchmark::State& state) {
const int kNumSpikes = 1000;
const int batch_size = 3 * num_threads;
std::vector<ShortWorkFunctorForAdd> work_vector(batch_size);
grpc_core::ThreadPool pool(num_threads);
while (state.KeepRunningBatch(kNumSpikes * batch_size)) {
grpc_core::ThreadPool pool(num_threads);
for (int i = 0; i != kNumSpikes; ++i) {
BlockingCounter counter(batch_size);
for (auto& w : work_vector) {

Loading…
Cancel
Save