| 84 | FieldVector TestFields() { return {field("int", int32()), field("str", utf8())}; } |
| 85 | |
| 86 | static void BenchmarkJSONChunking(benchmark::State& state, // NOLINT non-const reference |
| 87 | const std::shared_ptr<Buffer>& json, |
| 88 | ParseOptions options) { |
| 89 | auto chunker = MakeChunker(options); |
| 90 | |
| 91 | for (auto _ : state) { |
| 92 | std::shared_ptr<Buffer> chunked, partial; |
| 93 | ABORT_NOT_OK(chunker->Process(json, &chunked, &partial)); |
| 94 | } |
| 95 | |
| 96 | state.SetBytesProcessed(state.iterations() * json->size()); |
| 97 | state.counters["json_size"] = static_cast<double>(json->size()); |
| 98 | } |
| 99 | |
| 100 | static void ChunkJSONPrettyPrinted( |
| 101 | benchmark::State& state) { // NOLINT non-const reference |
no test coverage detected