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

Function BM_PlainDecodingInt64

cpp/src/parquet/encoding_benchmark.cc:131–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129BENCHMARK(BM_PlainEncodingInt64)->Range(MIN_RANGE, MAX_RANGE);
130
131static void BM_PlainDecodingInt64(benchmark::State& state) {
132 std::vector<int64_t> values(state.range(0), 64);
133 auto encoder = MakeTypedEncoder<Int64Type>(Encoding::PLAIN);
134 encoder->Put(values.data(), static_cast<int>(values.size()));
135 std::shared_ptr<Buffer> buf = encoder->FlushValues();
136
137 for (auto _ : state) {
138 auto decoder = MakeTypedDecoder<Int64Type>(Encoding::PLAIN);
139 decoder->SetData(static_cast<int>(values.size()), buf->data(),
140 static_cast<int>(buf->size()));
141 decoder->Decode(values.data(), static_cast<int>(values.size()));
142 }
143 state.SetBytesProcessed(state.iterations() * state.range(0) * sizeof(int64_t));
144}
145
146BENCHMARK(BM_PlainDecodingInt64)->Range(MIN_RANGE, MAX_RANGE);
147

Callers

nothing calls this directly

Calls 6

PutMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
FlushValuesMethod · 0.45
SetDataMethod · 0.45
DecodeMethod · 0.45

Tested by

no test coverage detected