| 66 | } |
| 67 | |
| 68 | int64_t BytesPerIteration(int64_t num_fields, int64_t is_partial_read, |
| 69 | int64_t total_size) { |
| 70 | std::size_t num_actual_fields = GetIncludedFields(num_fields, is_partial_read).size(); |
| 71 | double selectivity = num_actual_fields / static_cast<double>(num_fields); |
| 72 | if (num_actual_fields == 0) selectivity = 1; |
| 73 | auto bytes = total_size * selectivity; |
| 74 | return static_cast<int64_t>(bytes); |
| 75 | } |
| 76 | |
| 77 | static void WriteRecordBatch(benchmark::State& state) { // NOLINT non-const reference |
| 78 | // 1MB |
nothing calls this directly
no test coverage detected