From 9c9175b8658cade244272464ede3c21be34df172 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Fri, 19 Jul 2024 15:36:50 +0200 Subject: just-mr: Pass progress and statistics instances to reporter --- src/other_tools/just_mr/fetch.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/other_tools/just_mr/fetch.cpp') diff --git a/src/other_tools/just_mr/fetch.cpp b/src/other_tools/just_mr/fetch.cpp index ed585d80..328f0d74 100644 --- a/src/other_tools/just_mr/fetch.cpp +++ b/src/other_tools/just_mr/fetch.cpp @@ -35,6 +35,7 @@ #include "src/other_tools/just_mr/exit_codes.hpp" #include "src/other_tools/just_mr/progress_reporting/progress.hpp" #include "src/other_tools/just_mr/progress_reporting/progress_reporter.hpp" +#include "src/other_tools/just_mr/progress_reporting/statistics.hpp" #include "src/other_tools/just_mr/setup_utils.hpp" #include "src/other_tools/ops_maps/archive_fetch_map.hpp" #include "src/other_tools/ops_maps/content_cas_map.hpp" @@ -520,7 +521,8 @@ auto MultiRepoFetch(std::shared_ptr const& config, JustMRProgress::Instance().SetTotal(static_cast(nr_a + nr_gt)); std::atomic done{false}; std::condition_variable cv{}; - auto reporter = JustMRProgressReporter::Reporter(); + auto reporter = JustMRProgressReporter::Reporter( + &JustMRStatistics::Instance(), &JustMRProgress::Instance()); auto observer = std::thread([reporter, &done, &cv]() { reporter(&done, &cv); }); -- cgit v1.2.3