summaryrefslogtreecommitdiff
path: root/src/other_tools/root_maps/commit_git_map.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-02-28 17:49:55 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-03-06 10:39:58 +0100
commit502b016897a7561bcd0158f9f6120f56ba35cef9 (patch)
tree53154a7fea5bac96509b6f47fddfafe71f8b9b02 /src/other_tools/root_maps/commit_git_map.cpp
parent8f15cfaab8e6913a23dd31bcaf7399b539a9aac9 (diff)
downloadjustbuild-502b016897a7561bcd0158f9f6120f56ba35cef9.tar.gz
Progress reporting: Adjust just-mr maps statistics counting
Reporting and counting should be done as early as possible, once known that there is nothing cached.
Diffstat (limited to 'src/other_tools/root_maps/commit_git_map.cpp')
-rw-r--r--src/other_tools/root_maps/commit_git_map.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/other_tools/root_maps/commit_git_map.cpp b/src/other_tools/root_maps/commit_git_map.cpp
index a4759cc1..5e63e699 100644
--- a/src/other_tools/root_maps/commit_git_map.cpp
+++ b/src/other_tools/root_maps/commit_git_map.cpp
@@ -59,6 +59,9 @@ void EnsureCommit(GitRepoInfo const& repo_info,
return;
}
if (not is_commit_present.value()) {
+ // start work reporting
+ JustMRProgress::Instance().TaskTracker().Start(repo_info.origin);
+ JustMRStatistics::Instance().IncrementQueuedCounter();
// if commit not there, fetch it
auto tmp_dir = JustMR::Utils::CreateTypedTmpDir("fetch");
if (not tmp_dir) {
@@ -108,10 +111,6 @@ void EnsureCommit(GitRepoInfo const& repo_info,
"Keep referenced tree alive" // message
},
GitOpType::KEEP_TAG};
- // start work reporting
- JustMRProgress::Instance().TaskTracker().Start(repo_info.origin);
- JustMRStatistics::Instance().IncrementQueuedCounter();
- // do the fetch
critical_git_op_map->ConsumeAfterKeysReady(
ts,
{std::move(op_key)},