| 43 | static constexpr int64_t kTotalBatchSize = 1000000; |
| 44 | |
| 45 | static void ProjectionOverhead(benchmark::State& state, Expression expr) { |
| 46 | const int32_t batch_size = static_cast<int32_t>(state.range(0)); |
| 47 | const int32_t num_batches = kTotalBatchSize / batch_size; |
| 48 | |
| 49 | arrow::acero::BatchesWithSchema data = MakeRandomBatches( |
| 50 | schema({field("i64", int64()), field("bool", boolean())}), num_batches, batch_size); |
| 51 | std::vector<arrow::acero::Declaration> project_node_dec = { |
| 52 | {"project", ProjectNodeOptions{{expr}}}}; |
| 53 | ASSERT_OK( |
| 54 | BenchmarkNodeOverhead(state, num_batches, batch_size, data, project_node_dec)); |
| 55 | } |
| 56 | |
| 57 | static void ProjectionOverheadIsolated(benchmark::State& state, Expression expr) { |
| 58 | const int32_t batch_size = static_cast<int32_t>(state.range(0)); |
nothing calls this directly
no test coverage detected