| 644 | } |
| 645 | |
| 646 | static void BM_ReadStructColumn(::benchmark::State& state) { |
| 647 | constexpr int64_t kNumValues = BENCHMARK_SIZE / 10; |
| 648 | const double null_probability = static_cast<double>(state.range(0)) / 100.0; |
| 649 | const bool nullable = (null_probability != 0.0); |
| 650 | |
| 651 | ARROW_CHECK_GE(null_probability, 0.0); |
| 652 | |
| 653 | const int64_t kBytesPerValue = sizeof(int32_t) + sizeof(int64_t); |
| 654 | |
| 655 | ::arrow::random::RandomArrayGenerator rng(42); |
| 656 | auto array = MakeStructArray(&rng, kNumValues, null_probability); |
| 657 | |
| 658 | BenchmarkReadArray(state, array, nullable, kNumValues, kBytesPerValue * kNumValues); |
| 659 | } |
| 660 | |
| 661 | BENCHMARK(BM_ReadStructColumn)->Apply(NestedReadArguments); |
| 662 |
nothing calls this directly
no test coverage detected