diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-01-10 15:52:32 +0100 |
---|---|---|
committer | Sascha Roloff <sascha.roloff@huawei.com> | 2023-02-27 21:11:41 +0100 |
commit | 6d28e7e77bafe30b6a30289d2755ca0bf49636bc (patch) | |
tree | b366ec6cbcf6af66825c14f774aa787cc90a7d89 /src/other_tools/root_maps/distdir_git_map.cpp | |
parent | 80a82e4e8bd4ff2fba980690e14d416dfa4f79a8 (diff) | |
download | justbuild-6d28e7e77bafe30b6a30289d2755ca0bf49636bc.tar.gz |
Just-MR: Add progress reporting for setup command
This includes also the setup-env command, as well as all ~just~
known subcommands that require a just-mr setup step.
Co-authored-by: Sascha Roloff <sascha.roloff@huawei.com>
Diffstat (limited to 'src/other_tools/root_maps/distdir_git_map.cpp')
-rw-r--r-- | src/other_tools/root_maps/distdir_git_map.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/other_tools/root_maps/distdir_git_map.cpp b/src/other_tools/root_maps/distdir_git_map.cpp index 36914118..82e86303 100644 --- a/src/other_tools/root_maps/distdir_git_map.cpp +++ b/src/other_tools/root_maps/distdir_git_map.cpp @@ -20,7 +20,8 @@ #include "src/buildtool/execution_api/local/config.hpp" #include "src/buildtool/execution_api/local/local_cas.hpp" #include "src/buildtool/file_system/file_storage.hpp" -#include "src/other_tools/just_mr/utils.hpp" +#include "src/other_tools/just_mr/progress_reporting/progress.hpp" +#include "src/other_tools/just_mr/progress_reporting/statistics.hpp" #include "src/other_tools/ops_maps/content_cas_map.hpp" #include "src/other_tools/ops_maps/critical_git_op_map.hpp" #include "src/utils/cpp/tmp_dir.hpp" @@ -114,6 +115,9 @@ auto CreateDistdirGitMap( }); } else { + // start work reporting + JustMRProgress::Instance().TaskTracker().Start(key.origin); + JustMRStatistics::Instance().IncrementQueuedCounter(); // fetch the gathered distdir repos into CAS content_cas_map->ConsumeAfterKeysReady( ts, @@ -121,6 +125,7 @@ auto CreateDistdirGitMap( [distdir_tree_id_file, content_id = key.content_id, content_list = key.content_list, + origin = key.origin, import_to_git_map, ts, setter, @@ -151,6 +156,7 @@ auto CreateDistdirGitMap( {std::move(c_info)}, [tmp_dir, // keep tmp_dir alive distdir_tree_id_file, + origin, setter, logger](auto const& values) { // check for errors @@ -176,6 +182,11 @@ auto CreateDistdirGitMap( {"git tree", distdir_tree_id, JustMR::Utils::GetGitCacheRoot().string()})); + // report work done + JustMRProgress::Instance().TaskTracker().Stop( + origin); + JustMRStatistics::Instance() + .IncrementExecutedCounter(); }, [logger, target_path = tmp_dir->GetPath()]( auto const& msg, bool fatal) { |