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

Function ParseJSONBlockWithSchema

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

Source from the content-addressed store, hash-verified

138}
139
140static void ParseJSONBlockWithSchema(
141 benchmark::State& state) { // NOLINT non-const reference
142 const int32_t num_rows = 5000;
143 auto options = ParseOptions::Defaults();
144 options.unexpected_field_behavior = UnexpectedFieldBehavior::Error;
145 options.explicit_schema = schema(TestFields());
146
147 auto json = GenerateTestData(options.explicit_schema, num_rows);
148 BenchmarkJSONParsing(state, std::make_shared<Buffer>(json), options);
149}
150
151static void BenchmarkJSONReading(benchmark::State& state, // NOLINT non-const reference
152 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