From 17fe3c72557d774a151a1842398966581aa9bc47 Mon Sep 17 00:00:00 2001 From: Martin Marenz Date: Fri, 25 Aug 2023 18:54:14 +0200 Subject: [PATCH] Add `bytes_per_second` to hash_partition benchmark Adds `bytes_per_second` to the `PARTITION_BENCH` benchmark. This patch relates to #13735. --- cpp/benchmarks/hashing/partition.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cpp/benchmarks/hashing/partition.cpp b/cpp/benchmarks/hashing/partition.cpp index b688fe2ed7f..0bec4394216 100644 --- a/cpp/benchmarks/hashing/partition.cpp +++ b/cpp/benchmarks/hashing/partition.cpp @@ -43,6 +43,13 @@ void BM_hash_partition(benchmark::State& state) cuda_event_timer timer(state, true); auto output = cudf::hash_partition(input, columns_to_hash, num_partitions); } + + auto const bytes_read = num_rows * num_cols * sizeof(T); + auto const bytes_written = num_rows * num_cols * sizeof(T); + auto const partition_bytes = num_partitions * sizeof(cudf::size_type); + + state.SetBytesProcessed(static_cast(state.iterations()) * + (bytes_read + bytes_written + partition_bytes)); } BENCHMARK_DEFINE_F(Hashing, hash_partition)