summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_engine/executor/executor.hpp
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2025-02-28 12:11:32 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2025-03-10 16:28:59 +0100
commitcc393dfca1bfd0fdc3fe032df5ea54e12f50cb9d (patch)
treed054d83cbddf11c59cfd8afd233ea006c5746d3e /src/buildtool/execution_engine/executor/executor.hpp
parente45883f88fe02906abaee763146aee770e62ef05 (diff)
downloadjustbuild-cc393dfca1bfd0fdc3fe032df5ea54e12f50cb9d.tar.gz
Profiling: start collecting informations per actions
... so far, which actions where considered, and which of those were cached.
Diffstat (limited to 'src/buildtool/execution_engine/executor/executor.hpp')
-rw-r--r--src/buildtool/execution_engine/executor/executor.hpp34
1 files changed, 24 insertions, 10 deletions
diff --git a/src/buildtool/execution_engine/executor/executor.hpp b/src/buildtool/execution_engine/executor/executor.hpp
index 93cb9655..e030d2d6 100644
--- a/src/buildtool/execution_engine/executor/executor.hpp
+++ b/src/buildtool/execution_engine/executor/executor.hpp
@@ -64,6 +64,7 @@
#include "src/buildtool/file_system/object_type.hpp"
#include "src/buildtool/logging/log_level.hpp"
#include "src/buildtool/logging/logger.hpp"
+#include "src/buildtool/profile/profile.hpp"
#include "src/buildtool/progress_reporting/progress.hpp"
#include "src/buildtool/progress_reporting/task_tracker.hpp"
#include "src/utils/cpp/back_map.hpp"
@@ -828,11 +829,19 @@ class Executor {
context_.statistics,
context_.progress);
// check response and save digests of results
- return not response or Impl::ParseResponse(*logger_,
- *response,
- action,
- context_.statistics,
- context_.progress);
+ if (not response) {
+ return true;
+ }
+ auto result = Impl::ParseResponse(*logger_,
+ *response,
+ action,
+ context_.statistics,
+ context_.progress);
+ if (context_.profile) {
+ (*context_.profile)
+ ->NoteActionCompleted(action->Content().Id(), *response);
+ }
+ return result;
}
Logger logger("action:" + action->Content().Id());
@@ -851,11 +860,16 @@ class Executor {
context_.progress);
// check response and save digests of results
- return not response or Impl::ParseResponse(logger,
- *response,
- action,
- context_.statistics,
- context_.progress);
+ if (not response) {
+ return true;
+ }
+ auto result = Impl::ParseResponse(
+ logger, *response, action, context_.statistics, context_.progress);
+ if (context_.profile) {
+ (*context_.profile)
+ ->NoteActionCompleted(action->Content().Id(), *response);
+ }
+ return result;
}
/// \brief Check artifact is available to the CAS or upload it.