summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md2
-rw-r--r--src/other_tools/just_mr/progress_reporting/progress_reporter.cpp10
-rw-r--r--src/other_tools/just_mr/progress_reporting/statistics.hpp8
-rw-r--r--src/other_tools/just_mr/setup.cpp2
-rw-r--r--src/other_tools/repo_map/repos_to_setup_map.cpp1
5 files changed, 18 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 10465798..319b7b98 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,8 @@ A feature release on top of `1.5.0`, backwards compatible.
file sytem.
- `just serve` now fetches trees from remote execution in parallel
and through its local CAS; this fixes a performance issue.
+- `just-mr` now also consideres computed roots (as no-op) when
+ reporting progress.
## Release `1.5.0` (2025-03-06)
diff --git a/src/other_tools/just_mr/progress_reporting/progress_reporter.cpp b/src/other_tools/just_mr/progress_reporting/progress_reporter.cpp
index 2ad17376..efff2fd7 100644
--- a/src/other_tools/just_mr/progress_reporting/progress_reporter.cpp
+++ b/src/other_tools/just_mr/progress_reporting/progress_reporter.cpp
@@ -31,11 +31,15 @@ auto JustMRProgressReporter::Reporter(
auto const total = progress->GetTotal();
auto const local = stats->LocalPathsCounter();
auto const cached = stats->CacheHitsCounter();
+ auto const computed = stats->ComputedCounter();
auto const run = stats->ExecutedCounter();
auto const active = progress->TaskTracker().Active();
auto const sample = progress->TaskTracker().Sample();
- auto msg =
- fmt::format("{} local, {} cached, {} done", local, cached, run);
+ auto msg = fmt::format("{} comptued, {} local, {} cached, {} done",
+ computed,
+ local,
+ cached,
+ run);
if ((active > 0) and not sample.empty()) {
msg = fmt::format("{}; {} fetches ({}{})",
msg,
@@ -45,7 +49,7 @@ auto JustMRProgressReporter::Reporter(
}
constexpr int kOneHundred{100};
int progress = kOneHundred; // default if no work has to be done
- if (auto const noops = cached + local; noops < total) {
+ if (auto const noops = cached + local + computed; noops < total) {
progress = static_cast<int>(run * kOneHundred / (total - noops));
}
Logger::Log(LogLevel::Progress, "[{:3}%] {}", progress, msg);
diff --git a/src/other_tools/just_mr/progress_reporting/statistics.hpp b/src/other_tools/just_mr/progress_reporting/statistics.hpp
index dc5cd181..20a39990 100644
--- a/src/other_tools/just_mr/progress_reporting/statistics.hpp
+++ b/src/other_tools/just_mr/progress_reporting/statistics.hpp
@@ -22,6 +22,7 @@ class JustMRStatistics final {
public:
void IncrementLocalPathsCounter() noexcept { ++num_local_paths_; }
void IncrementCacheHitsCounter() noexcept { ++num_cache_hits_; }
+ void IncrementComputedCounter() noexcept { ++num_computed_; }
void IncrementExecutedCounter() noexcept { ++num_executed_; }
[[nodiscard]] auto LocalPathsCounter() const noexcept -> size_t {
@@ -30,6 +31,9 @@ class JustMRStatistics final {
[[nodiscard]] auto CacheHitsCounter() const noexcept -> size_t {
return num_cache_hits_;
}
+ [[nodiscard]] auto ComputedCounter() const noexcept -> size_t {
+ return num_computed_;
+ }
[[nodiscard]] auto ExecutedCounter() const noexcept -> size_t {
return num_executed_;
}
@@ -37,7 +41,9 @@ class JustMRStatistics final {
private:
std::atomic<std::size_t> num_local_paths_ = 0; // roots that are real paths
std::atomic<std::size_t> num_cache_hits_ = 0; // no-ops
- std::atomic<std::size_t> num_executed_ = 0; // actual work done
+ std::atomic<std::size_t> num_computed_ =
+ 0; // no work to be done, as it is computed
+ std::atomic<std::size_t> num_executed_ = 0; // actual work done
};
#endif // INCLUDED_SRC_OTHER_TOOLS_JUST_MR_PROGRESS_REPORTING_STATISTICS_HPP
diff --git a/src/other_tools/just_mr/setup.cpp b/src/other_tools/just_mr/setup.cpp
index 9ba02fa7..57ed0fd9 100644
--- a/src/other_tools/just_mr/setup.cpp
+++ b/src/other_tools/just_mr/setup.cpp
@@ -141,7 +141,7 @@ auto MultiRepoSetup(std::shared_ptr<Configuration> const& config,
JustMR::Utils::ReachableRepositories(repos, *main, setup_repos);
}
Logger::Log(LogLevel::Info,
- "Found {} repositories to set up",
+ "Found {} repositories involved",
setup_repos->to_setup.size());
// setup local execution config
diff --git a/src/other_tools/repo_map/repos_to_setup_map.cpp b/src/other_tools/repo_map/repos_to_setup_map.cpp
index e819a943..4e29ffc2 100644
--- a/src/other_tools/repo_map/repos_to_setup_map.cpp
+++ b/src/other_tools/repo_map/repos_to_setup_map.cpp
@@ -883,6 +883,7 @@ auto CreateReposToSetupMap(
break;
}
case CheckoutType::Precomputed: {
+ stats->IncrementComputedCounter();
PrecomputedRootCheckout(*resolved_repo_desc,
std::move(repos),
key,