From e63f64176ec362a00c7a9123f6244a44fdbe2ad2 Mon Sep 17 00:00:00 2001 From: Martin Marenz Date: Wed, 30 Aug 2023 17:21:09 +0200 Subject: [PATCH] Add `bytes_per_second` to hash_partition benchmark (#13965) Adds `bytes_per_second` to the `PARTITION_BENCH` benchmark. This patch relates to #13735. Authors: - Martin Marenz (https://github.com/Blonck) - Mark Harris (https://github.com/harrism) Approvers: - David Wendt (https://github.com/davidwendt) - Mark Harris (https://github.com/harrism) URL: https://github.com/rapidsai/cudf/pull/13965 --- 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)