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

Function BM_WriteListColumn

cpp/src/parquet/arrow/size_stats_benchmark.cc:131–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129
130template <SizeStatisticsLevel level, typename ArrowType, bool enable_page_index>
131void BM_WriteListColumn(::benchmark::State& state) {
132 ::arrow::random::RandomArrayGenerator generator(/*seed=*/42);
133 auto element_type = std::make_shared<ArrowType>();
134 auto element_array = generator.ArrayOf(element_type, kBenchmarkSize, kNullProbability);
135 auto list_type = ::arrow::list(element_type);
136 auto list_array = generator.List(*element_array, kBenchmarkSize / 10, kNullProbability);
137 auto table = ::arrow::Table::Make(
138 ::arrow::schema({::arrow::field("column", list_type, kNullProbability > 0)}),
139 {list_array});
140 WriteColumn(state, table, level, enable_page_index);
141}
142
143BENCHMARK_TEMPLATE(BM_WritePrimitiveColumn, SizeStatisticsLevel::None, ::arrow::Int64Type,
144 /*enable_page_index=*/false);

Callers

nothing calls this directly

Calls 7

listFunction · 0.85
WriteColumnFunction · 0.85
fieldFunction · 0.70
MakeFunction · 0.50
schemaFunction · 0.50
ArrayOfMethod · 0.45
ListMethod · 0.45

Tested by

no test coverage detected