Skip to content

Commit

Permalink
Add bytes_per_second to hash_partition benchmark (#13965)
Browse files Browse the repository at this point in the history
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: #13965
  • Loading branch information
Blonck authored Aug 30, 2023
1 parent 9259a20 commit e63f641
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cpp/benchmarks/hashing/partition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int64_t>(state.iterations()) *
(bytes_read + bytes_written + partition_bytes));
}

BENCHMARK_DEFINE_F(Hashing, hash_partition)
Expand Down

0 comments on commit e63f641

Please sign in to comment.