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

Function ParseJSONBlockWithSchema

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

Source from the content-addressed store, hash-verified

187}
188
189static void ParseJSONBlockWithSchema(
190 benchmark::State& state) { // NOLINT non-const reference
191 const int32_t num_rows = 5000;
192 auto options = ParseOptions::Defaults();
193 options.unexpected_field_behavior = UnexpectedFieldBehavior::Error;
194 options.explicit_schema = schema(TestFields());
195
196 auto json = GenerateTestData(options.explicit_schema, num_rows);
197 BenchmarkJSONParsing(state, std::make_shared<Buffer>(json), options);
198}
199
200static void BenchmarkJSONReading(benchmark::State& state, // NOLINT non-const reference
201 const std::string& json, ReadOptions read_options,

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected