MCPcopy Create free account
hub / github.com/apache/arrow / BytesPerIteration

Function BytesPerIteration

cpp/src/arrow/ipc/read_write_benchmark.cc:68–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68int64_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
77static void WriteRecordBatch(benchmark::State& state) { // NOLINT non-const reference
78 // 1MB

Callers

nothing calls this directly

Calls 2

GetIncludedFieldsFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected