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

Function GenerateTestData

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

Source from the content-addressed store, hash-verified

34
35template <typename Input>
36std::string GenerateTestData(const Input& input, int num_rows,
37 const GenerateOptions& options, bool pretty = false) {
38 std::default_random_engine engine(kSeed);
39 std::string json;
40 for (int i = 0; i < num_rows; ++i) {
41 StringBuffer sb;
42 Writer writer(sb);
43 ABORT_NOT_OK(Generate(input, engine, &writer, options));
44 json += pretty ? PrettyPrint(sb.GetString()) : sb.GetString();
45 json += "\n";
46 }
47 return json;
48}
49
50template <typename Input>
51std::string GenerateTestData(const Input& input, int num_rows, bool pretty = false) {

Callers 6

ChunkJSONPrettyPrintedFunction · 0.70
ChunkJSONLineDelimitedFunction · 0.70
ParseJSONBlockWithSchemaFunction · 0.70
ParseJSONFieldsFunction · 0.70
TYPED_TESTFunction · 0.50

Calls 4

GenerateFunction · 0.85
PrettyPrintFunction · 0.70
DefaultsFunction · 0.50
GetStringMethod · 0.45

Tested by 1

TYPED_TESTFunction · 0.40