| 602 | } |
| 603 | |
| 604 | static void BM_ReadStructColumn(::benchmark::State& state) { |
| 605 | constexpr int64_t kNumValues = BENCHMARK_SIZE / 10; |
| 606 | const double null_probability = static_cast<double>(state.range(0)) / 100.0; |
| 607 | const bool nullable = (null_probability != 0.0); |
| 608 | |
| 609 | ARROW_CHECK_GE(null_probability, 0.0); |
| 610 | |
| 611 | const int64_t kBytesPerValue = sizeof(int32_t) + sizeof(int64_t); |
| 612 | |
| 613 | ::arrow::random::RandomArrayGenerator rng(42); |
| 614 | auto array = MakeStructArray(&rng, kNumValues, null_probability); |
| 615 | |
| 616 | BenchmarkReadArray(state, array, nullable, kNumValues, kBytesPerValue * kNumValues); |
| 617 | } |
| 618 | |
| 619 | BENCHMARK(BM_ReadStructColumn)->Apply(NestedReadArguments); |
| 620 |
nothing calls this directly
no test coverage detected