| 230 | } |
| 231 | |
| 232 | static void ScanOnlyBench(benchmark::State& state) { |
| 233 | size_t num_batches = state.range(0); |
| 234 | size_t batch_size = state.range(1); |
| 235 | |
| 236 | std::function<Result<std::shared_ptr<acero::ExecNodeOptions>>(size_t, size_t)> |
| 237 | options_factory; |
| 238 | std::string scan_factory = "scan"; |
| 239 | if (state.range(2) == kScanIdx) { |
| 240 | options_factory = kScanFactory; |
| 241 | } else if (state.range(2) == kScanV2Idx) { |
| 242 | options_factory = kScanV2Factory; |
| 243 | scan_factory = "scan2"; |
| 244 | } |
| 245 | |
| 246 | for (auto _ : state) { |
| 247 | ScanOnly(num_batches, batch_size, scan_factory, options_factory); |
| 248 | } |
| 249 | state.SetItemsProcessed(state.iterations() * num_batches); |
| 250 | state.SetBytesProcessed(state.iterations() * num_batches * batch_size * |
| 251 | GetBytesForSchema()); |
| 252 | } |
| 253 | |
| 254 | static void ScanBenchmark_Customize(benchmark::internal::Benchmark* b) { |
| 255 | for (const int32_t num_batches : {1000}) { |
nothing calls this directly
no test coverage detected