summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/other_tools/root_maps/commit_git_map.cpp7
-rw-r--r--src/other_tools/root_maps/distdir_git_map.cpp2
2 files changed, 5 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)},
diff --git a/src/other_tools/root_maps/distdir_git_map.cpp b/src/other_tools/root_maps/distdir_git_map.cpp
index 82e86303..3289430b 100644
--- a/src/other_tools/root_maps/distdir_git_map.cpp
+++ b/src/other_tools/root_maps/distdir_git_map.cpp
@@ -103,6 +103,8 @@ auto CreateDistdirGitMap(
{"git tree",
distdir_tree_id,
JustMR::Utils::GetGitCacheRoot().string()}));
+ // report cache hit
+ JustMRStatistics::Instance().IncrementCacheHitsCounter();
},
[logger, target_path = JustMR::Utils::GetGitCacheRoot()](
auto const& msg, bool fatal) {