| 151 | } |
| 152 | |
| 153 | static void BuildInlineBinaryViewArray( |
| 154 | benchmark::State& state) { // NOLINT non-const reference |
| 155 | std::string_view kBinaryStrings[] = {"1", "12345678", "12345", "123456789", |
| 156 | "12", "", " "}; |
| 157 | |
| 158 | for (auto _ : state) { |
| 159 | BinaryViewBuilder builder(memory_tracker.memory_pool()); |
| 160 | |
| 161 | for (int64_t i = 0; i < kRounds * kNumberOfElements; i++) { |
| 162 | ABORT_NOT_OK(builder.Append(kBinaryStrings[i % 7])); |
| 163 | } |
| 164 | |
| 165 | std::shared_ptr<Array> out; |
| 166 | ABORT_NOT_OK(builder.Finish(&out)); |
| 167 | } |
| 168 | |
| 169 | state.SetBytesProcessed(state.iterations() * kBytesProcessed); |
| 170 | state.SetItemsProcessed(state.iterations() * kItemsProcessed); |
| 171 | } |
| 172 | |
| 173 | static void BuildNonInlineBinaryViewArray( |
| 174 | benchmark::State& state) { // NOLINT non-const reference |
nothing calls this directly
no test coverage detected