From 7104c7f1dc04187bd23e9499f247d628592e0dd8 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Fri, 17 Mar 2023 11:40:57 +0100 Subject: just-mr: rework progress reporting and statistics To avoid unnecessary work, just-mr uses on-disk caches, including for the mapping of a distdir to the corresponding git tree. This, however, implies that the number of repositories that are actually considered varies: in order to fetch a distdir repository, all involved archives have to be fetched, but if we have a cache hit none of them is even looked at. So, in order to have a consistent reporting only count top-level targets (i.e., the reachable repositories) in the statistics, not the archives implicitly contained in a distdir, nor low-level sub tasks. The actual fetch acitvity is shown separately by the task tracker. --- src/other_tools/root_maps/commit_git_map.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/other_tools/root_maps/commit_git_map.hpp') diff --git a/src/other_tools/root_maps/commit_git_map.hpp b/src/other_tools/root_maps/commit_git_map.hpp index 992f876c..413d83ac 100644 --- a/src/other_tools/root_maps/commit_git_map.hpp +++ b/src/other_tools/root_maps/commit_git_map.hpp @@ -16,6 +16,7 @@ #define INCLUDED_SRC_OTHER_TOOLS_ROOT_MAPS_COMMIT_GIT_MAP_HPP #include +#include #include "nlohmann/json.hpp" #include "src/other_tools/just_mr/utils.hpp" @@ -49,8 +50,10 @@ struct hash { }; } // namespace std -/// \brief Maps a Git repository commit hash to its tree workspace root. -using CommitGitMap = AsyncMapConsumer; +/// \brief Maps a Git repository commit hash to its tree workspace root, +/// together with the information whether it was a cache hit. +using CommitGitMap = + AsyncMapConsumer>; [[nodiscard]] auto CreateCommitGitMap( gsl::not_null const& critical_git_op_map, -- cgit v1.2.3