diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-04-20 17:33:53 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-04-25 15:46:01 +0200 |
commit | 4b5dfcecac43e14e57f76993f2431bae5f1866f3 (patch) | |
tree | 9ec4608fc1dd9023a00a595b41a5c70850441553 /src/buildtool/execution_engine/executor | |
parent | 830380a20f15c6c6d2f91213279c98de9f7cb399 (diff) | |
download | justbuild-4b5dfcecac43e14e57f76993f2431bae5f1866f3.tar.gz |
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.
Diffstat (limited to 'src/buildtool/execution_engine/executor')
-rw-r--r-- | src/buildtool/execution_engine/executor/TARGETS | 1 | ||||
-rw-r--r-- | src/buildtool/execution_engine/executor/executor.hpp | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/buildtool/execution_engine/executor/TARGETS b/src/buildtool/execution_engine/executor/TARGETS index fa1e3e9f..37106368 100644 --- a/src/buildtool/execution_engine/executor/TARGETS +++ b/src/buildtool/execution_engine/executor/TARGETS @@ -10,6 +10,7 @@ , ["src/buildtool/file_system", "file_system_manager"] , ["src/buildtool/execution_engine/dag", "dag"] , ["src/buildtool/execution_api/common", "common"] + , ["src/buildtool/progress_reporting", "progress"] , ["@", "gsl-lite", "", "gsl-lite"] ] , "stage": ["src", "buildtool", "execution_engine", "executor"] 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; |