From 574873c7fed97c5df26e33dda8d6cc7f221fad8a Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 8 Apr 2025 13:24:13 +0200 Subject: executor: also track begin and end of tree-overlay operations Those operations require fetching objects through the network. The fetch is already restricted to only the tree-objects where a merge is necessary, leaving out unchanged trees as well as all blobs. Still, some time may be required, especially over slow networks. Therefore report this activity in the progress. --- src/buildtool/execution_engine/executor/executor.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/buildtool/execution_engine/executor/executor.hpp') diff --git a/src/buildtool/execution_engine/executor/executor.hpp b/src/buildtool/execution_engine/executor/executor.hpp index 1981cb28..e86853fb 100644 --- a/src/buildtool/execution_engine/executor/executor.hpp +++ b/src/buildtool/execution_engine/executor/executor.hpp @@ -84,7 +84,11 @@ class ExecutorImpl { [[nodiscard]] static auto ExecuteTreeOverlayAction( Logger const& logger, gsl::not_null const& action, - IExecutionApi const& api) -> std::optional { + IExecutionApi const& api, + + gsl::not_null const& progress) + -> std::optional { + progress->TaskTracker().Start(action->Content().Id()); std::vector inputs = action->Dependencies(); std::sort(inputs.begin(), inputs.end(), [](auto a, auto b) { @@ -124,6 +128,7 @@ class ExecutorImpl { } tree_artifact.SetObjectInfo( tree.digest, ObjectType::Tree, failed_inputs); + progress->TaskTracker().Stop(action->Content().Id()); return std::nullopt; } @@ -142,7 +147,7 @@ class ExecutorImpl { gsl::not_null const& progress) -> std::optional { if (action->Content().IsTreeOverlayAction()) { - return ExecuteTreeOverlayAction(logger, action, api); + return ExecuteTreeOverlayAction(logger, action, api, progress); } auto const& inputs = action->Dependencies(); auto const tree_action = action->Content().IsTreeAction(); -- cgit v1.2.3