This benchmark simply provides a baseline indicating the raw cost of our workload depending on the workload size. Number of items / second in this (serial) benchmark can be compared to the numbers obtained in ThreadPoolSpawn.
| 224 | // depending on the workload size. Number of items / second in this (serial) |
| 225 | // benchmark can be compared to the numbers obtained in ThreadPoolSpawn. |
| 226 | static void ReferenceWorkloadCost(benchmark::State& state) { |
| 227 | const auto workload_size = static_cast<int32_t>(state.range(0)); |
| 228 | |
| 229 | Workload workload(workload_size); |
| 230 | for (auto _ : state) { |
| 231 | workload(); |
| 232 | } |
| 233 | |
| 234 | state.SetItemsProcessed(state.iterations()); |
| 235 | } |
| 236 | |
| 237 | BENCHMARK(ReferenceWorkloadCost)->Apply(WorkloadCost_Customize); |
| 238 |
nothing calls this directly
no outgoing calls
no test coverage detected