Benchmark SerialExecutor::RunInSerialExecutor
| 105 | |
| 106 | // Benchmark SerialExecutor::RunInSerialExecutor |
| 107 | static void RunInSerialExecutor(benchmark::State& state) { // NOLINT non-const reference |
| 108 | const auto workload_size = static_cast<int32_t>(state.range(0)); |
| 109 | |
| 110 | Workload workload(workload_size); |
| 111 | |
| 112 | for (auto _ : state) { |
| 113 | ABORT_NOT_OK( |
| 114 | SerialExecutor::RunInSerialExecutor<Future<>>([&](internal::Executor* executor) { |
| 115 | return DeferNotOk(executor->Submit(std::ref(workload))); |
| 116 | })); |
| 117 | } |
| 118 | |
| 119 | state.SetItemsProcessed(state.iterations()); |
| 120 | } |
| 121 | |
| 122 | // Benchmark ThreadPool::Submit |
| 123 | static void ThreadPoolSubmit(benchmark::State& state) { // NOLINT non-const reference |
nothing calls this directly
no test coverage detected