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

Function BenchmarkReadJSONBlockWithSchema

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

Source from the content-addressed store, hash-verified

166}
167
168static void BenchmarkReadJSONBlockWithSchema(
169 benchmark::State& state, // NOLINT non-const reference
170 bool use_threads) {
171 const int32_t num_rows = 500000;
172 auto read_options = ReadOptions::Defaults();
173 read_options.use_threads = use_threads;
174
175 auto parse_options = ParseOptions::Defaults();
176 parse_options.unexpected_field_behavior = UnexpectedFieldBehavior::Error;
177 parse_options.explicit_schema = schema(TestFields());
178
179 auto json = GenerateTestData(parse_options.explicit_schema, num_rows);
180 BenchmarkJSONReading(state, json, read_options, parse_options);
181}
182
183static void ReadJSONBlockWithSchemaSingleThread(
184 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