From 19b4d88a9ac333c74919e0e99a3c58a4c739c882 Mon Sep 17 00:00:00 2001 From: Carl Pearson Date: Mon, 18 Dec 2023 13:19:32 -0700 Subject: [PATCH] perf_tests: add BytesProcessed to test_sendrecv --- perf_tests/test_sendrecv.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/perf_tests/test_sendrecv.cpp b/perf_tests/test_sendrecv.cpp index fc727c42..ac75e3cf 100644 --- a/perf_tests/test_sendrecv.cpp +++ b/perf_tests/test_sendrecv.cpp @@ -23,13 +23,17 @@ void benchmark_sendrecv(benchmark::State &state) { state.SkipWithError("benchmark_sendrecv needs at least 2 ranks"); } + using Scalar = double; + auto space = Kokkos::DefaultExecutionSpace(); - using view_type = Kokkos::View; + using view_type = Kokkos::View; view_type a("", 1000000); while(state.KeepRunning()) { do_iteration(state, MPI_COMM_WORLD, send_recv, space, rank, a); } + + state.SetBytesProcessed(sizeof(Scalar) * state.iterations() * a.size() * 2); } BENCHMARK(benchmark_sendrecv)->UseManualTime()->Unit(benchmark::kMillisecond); \ No newline at end of file