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

Function BenchmarkReadJSONBlockWithSchema

cpp/src/arrow/json/parser_benchmark.cc:217–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217static void BenchmarkReadJSONBlockWithSchema(
218 benchmark::State& state, // NOLINT non-const reference
219 bool use_threads) {
220 const int32_t num_rows = 500000;
221 auto read_options = ReadOptions::Defaults();
222 read_options.use_threads = use_threads;
223
224 auto parse_options = ParseOptions::Defaults();
225 parse_options.unexpected_field_behavior = UnexpectedFieldBehavior::Error;
226 parse_options.explicit_schema = schema(TestFields());
227
228 auto json = GenerateTestData(parse_options.explicit_schema, num_rows);
229 BenchmarkJSONReading(state, json, read_options, parse_options);
230}
231
232static void ReadJSONBlockWithSchemaSingleThread(
233 benchmark::State& state) { // NOLINT non-const reference

Calls 5

TestFieldsFunction · 0.85
BenchmarkJSONReadingFunction · 0.85
GenerateTestDataFunction · 0.70
DefaultsFunction · 0.50
schemaFunction · 0.50

Tested by

no test coverage detected