Skip to content

Commit

Permalink
perf_tests: add BytesProcessed to test_sendrecv
Browse files Browse the repository at this point in the history
  • Loading branch information
cwpearson committed Dec 18, 2023
1 parent d0f212f commit 19b4d88
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion perf_tests/test_sendrecv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<double *>;
using view_type = Kokkos::View<Scalar *>;
view_type a("", 1000000);

while(state.KeepRunning()) {
do_iteration(state, MPI_COMM_WORLD, send_recv<Kokkos::DefaultExecutionSpace, view_type>, space, rank, a);
}

state.SetBytesProcessed(sizeof(Scalar) * state.iterations() * a.size() * 2);
}

BENCHMARK(benchmark_sendrecv)->UseManualTime()->Unit(benchmark::kMillisecond);

0 comments on commit 19b4d88

Please sign in to comment.