From 4b5dfcecac43e14e57f76993f2431bae5f1866f3 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Wed, 20 Apr 2022 17:33:53 +0200 Subject: Progress reporting: include origins of running actions For a user, an important information is to know which actions are currently running and, more importantly, the target that caused them. To do so, we need a bit of infrastructure. - We have to keep track of begin and end of running actions, as well as the order in which they were started. That has to happen efficiently and in a thread-safe way. - We have to compute and keep the origin map for actions, even if we don't serialize the action graph. --- src/buildtool/execution_engine/executor/executor.hpp | 3 +++ 1 file changed, 3 insertions(+) (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 c08a6a2c..9ef38488 100644 --- a/src/buildtool/execution_engine/executor/executor.hpp +++ b/src/buildtool/execution_engine/executor/executor.hpp @@ -19,6 +19,7 @@ #include "src/buildtool/execution_engine/dag/dag.hpp" #include "src/buildtool/file_system/file_system_manager.hpp" #include "src/buildtool/logging/logger.hpp" +#include "src/buildtool/progress_reporting/progress.hpp" /// \brief Implementations for executing actions and uploading artifacts. class ExecutorImpl { @@ -53,6 +54,7 @@ class ExecutorImpl { return std::nullopt; } + Progress::Instance().Start(action->Content().Id()); Statistics::Instance().IncrementActionsQueuedCounter(); logger.Emit(LogLevel::Trace, [&inputs]() { @@ -290,6 +292,7 @@ class ExecutorImpl { else { Statistics::Instance().IncrementActionsExecutedCounter(); } + Progress::Instance().Stop(action->Content().Id()); PrintInfo(logger, action->Command(), response); bool should_fail_outputs = false; -- cgit v1.2.3