From cc393dfca1bfd0fdc3fe032df5ea54e12f50cb9d Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Fri, 28 Feb 2025 12:11:32 +0100 Subject: Profiling: start collecting informations per actions ... so far, which actions where considered, and which of those were cached. --- .../execution_engine/executor/executor.hpp | 34 +++++++++++++++------- 1 file changed, 24 insertions(+), 10 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 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. -- cgit v1.2.3