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

Function BenchmarkCSVChunking

cpp/src/arrow/csv/parser_benchmark.cc:77–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77static void BenchmarkCSVChunking(benchmark::State& state, // NOLINT non-const reference
78 const std::string& csv, ParseOptions options) {
79 auto chunker = MakeChunker(options);
80 auto block = std::make_shared<Buffer>(std::string_view(csv));
81
82 while (state.KeepRunning()) {
83 std::shared_ptr<Buffer> whole, partial;
84 ABORT_NOT_OK(chunker->Process(block, &whole, &partial));
85 auto size = whole->size();
86 benchmark::DoNotOptimize(size);
87 }
88
89 state.SetBytesProcessed(state.iterations() * csv.length());
90}
91
92static void BenchmarkCSVChunking(benchmark::State& state, // NOLINT non-const reference
93 const Example& example, ParseOptions options) {

Callers 6

ChunkCSVQuotedBlockFunction · 0.85
ChunkCSVEscapedBlockFunction · 0.85
ChunkCSVNoNewlinesBlockFunction · 0.85
ChunkCSVFlightsExampleFunction · 0.85
ChunkCSVVehiclesExampleFunction · 0.85
ChunkCSVStocksExampleFunction · 0.85

Calls 5

BuildCSVDataFunction · 0.85
MakeChunkerFunction · 0.70
ProcessMethod · 0.45
sizeMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected