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

Function ColumnReaderSkipInt32

cpp/src/parquet/column_reader_benchmark.cc:100–117  ·  view source on GitHub ↗

Benchmarks Skip for ColumnReader with the following parameters in order: - repetition: 0 for REQUIRED, 1 for OPTIONAL, 2 for REPEATED. - batch_size: sets how many values to read at each call.

Source from the content-addressed store, hash-verified

98// - repetition: 0 for REQUIRED, 1 for OPTIONAL, 2 for REPEATED.
99// - batch_size: sets how many values to read at each call.
100static void ColumnReaderSkipInt32(::benchmark::State& state) {
101 const auto repetition = static_cast<Repetition::type>(state.range(0));
102 const auto batch_size = static_cast<int64_t>(state.range(1));
103
104 BenchmarkHelper helper(repetition, /*num_pages=*/16, /*levels_per_page=*/80000);
105
106 for (auto _ : state) {
107 state.PauseTiming();
108 Int32Reader* reader = helper.ResetColumnReader();
109 int64_t values_count = -1;
110 state.ResumeTiming();
111 while (values_count != 0) {
112 DoNotOptimize(values_count = reader->Skip(batch_size));
113 }
114 }
115
116 state.SetBytesProcessed(state.iterations() * helper.total_size());
117}
118
119// Benchmarks ReadBatch for ColumnReader with the following parameters in order:
120// - repetition: 0 for REQUIRED, 1 for OPTIONAL, 2 for REPEATED.

Callers

nothing calls this directly

Calls 3

ResetColumnReaderMethod · 0.80
SkipMethod · 0.80
total_sizeMethod · 0.80

Tested by

no test coverage detected