summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/buildtool/common/statistics.hpp6
-rw-r--r--src/buildtool/execution_engine/executor/executor.hpp3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/buildtool/common/statistics.hpp b/src/buildtool/common/statistics.hpp
index a7b89791..6ddcf7d3 100644
--- a/src/buildtool/common/statistics.hpp
+++ b/src/buildtool/common/statistics.hpp
@@ -12,6 +12,7 @@ class Statistics {
void Reset() noexcept {
num_actions_queued_ = 0;
+ num_actions_executed_ = 0;
num_actions_cached_ = 0;
num_actions_flaky_ = 0;
num_actions_flaky_tainted_ = 0;
@@ -19,6 +20,7 @@ class Statistics {
num_rebuilt_actions_missing_ = 0;
}
void IncrementActionsQueuedCounter() noexcept { ++num_actions_queued_; }
+ void IncrementActionsExecutedCounter() noexcept { ++num_actions_executed_; }
void IncrementActionsCachedCounter() noexcept { ++num_actions_cached_; }
void IncrementActionsFlakyCounter() noexcept { ++num_actions_flaky_; }
void IncrementActionsFlakyTaintedCounter() noexcept {
@@ -33,6 +35,9 @@ class Statistics {
[[nodiscard]] auto ActionsQueuedCounter() const noexcept -> int {
return num_actions_queued_;
}
+ [[nodiscard]] auto ActionsExecutedCounter() const noexcept -> int {
+ return num_actions_executed_;
+ }
[[nodiscard]] auto ActionsCachedCounter() const noexcept -> int {
return num_actions_cached_;
}
@@ -51,6 +56,7 @@ class Statistics {
private:
std::atomic<int> num_actions_queued_{};
+ std::atomic<int> num_actions_executed_{};
std::atomic<int> num_actions_cached_{};
std::atomic<int> num_actions_flaky_{};
std::atomic<int> num_actions_flaky_tainted_{};
diff --git a/src/buildtool/execution_engine/executor/executor.hpp b/src/buildtool/execution_engine/executor/executor.hpp
index 94c32b1f..9caa7bee 100644
--- a/src/buildtool/execution_engine/executor/executor.hpp
+++ b/src/buildtool/execution_engine/executor/executor.hpp
@@ -261,6 +261,9 @@ class ExecutorImpl {
logger.Emit(LogLevel::Trace, " - served from cache");
Statistics::Instance().IncrementActionsCachedCounter();
}
+ else {
+ Statistics::Instance().IncrementActionsExecutedCounter();
+ }
PrintInfo(logger, action->Command(), response);
bool should_fail_outputs = false;