MCPcopy Create free account
hub / github.com/apache/arrow / ProjectionOverhead

Function ProjectionOverhead

cpp/src/arrow/acero/project_benchmark.cc:45–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43static constexpr int64_t kTotalBatchSize = 1000000;
44
45static 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
57static void ProjectionOverheadIsolated(benchmark::State& state, Expression expr) {
58 const int32_t batch_size = static_cast<int32_t>(state.range(0));

Callers

nothing calls this directly

Calls 4

MakeRandomBatchesFunction · 0.85
BenchmarkNodeOverheadFunction · 0.85
schemaFunction · 0.50
fieldFunction · 0.50

Tested by

no test coverage detected