summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_engine/executor/executor.hpp
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2025-04-08 13:24:13 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2025-04-08 13:29:14 +0200
commit574873c7fed97c5df26e33dda8d6cc7f221fad8a (patch)
treea071d17699be02666dba2003066c0cb9f34b50c2 /src/buildtool/execution_engine/executor/executor.hpp
parenta0b64bc327b4ed57f8056f2597b3bc5e9736e8ee (diff)
downloadjustbuild-574873c7fed97c5df26e33dda8d6cc7f221fad8a.tar.gz
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.
Diffstat (limited to 'src/buildtool/execution_engine/executor/executor.hpp')
-rw-r--r--src/buildtool/execution_engine/executor/executor.hpp9
1 files changed, 7 insertions, 2 deletions
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<DependencyGraph::ActionNode const*> const& action,
- IExecutionApi const& api) -> std::optional<IExecutionResponse::Ptr> {
+ IExecutionApi const& api,
+
+ gsl::not_null<Progress*> const& progress)
+ -> std::optional<IExecutionResponse::Ptr> {
+ progress->TaskTracker().Start(action->Content().Id());
std::vector<DependencyGraph::NamedArtifactNodePtr> 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<Progress*> const& progress)
-> std::optional<IExecutionResponse::Ptr> {
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();