Skip to content

Commit

Permalink
Bring back git info to benchmarks output
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs committed Mar 8, 2023
1 parent 0b2a956 commit 488ff10
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions core/perf_test/Benchmark_Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,25 @@ void add_kokkos_configuration(bool verbose) {
}
}

void add_git_info() {
if (!Kokkos::Impl::GIT_BRANCH.empty()) {
benchmark::AddCustomContext("GIT_BRANCH", Kokkos::Impl::GIT_BRANCH);
benchmark::AddCustomContext("GIT_COMMIT_HASH",
Kokkos::Impl::GIT_COMMIT_HASH);
benchmark::AddCustomContext("GIT_CLEAN_STATUS",
Kokkos::Impl::GIT_CLEAN_STATUS);
benchmark::AddCustomContext("GIT_COMMIT_DESCRIPTION",
Kokkos::Impl::GIT_COMMIT_DESCRIPTION);
benchmark::AddCustomContext("GIT_COMMIT_DATE",
Kokkos::Impl::GIT_COMMIT_DATE);
}
}

void add_benchmark_context(bool verbose) {
// Add Kokkos configuration to benchmark context data
add_kokkos_configuration(verbose);
// Add git information to benchmark context data
add_git_info();
}

} // namespace KokkosBenchmark

0 comments on commit 488ff10

Please sign in to comment.