From bc9fa36c65183a0b8e14b37c9aa2e07ce768463e Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Mon, 22 Aug 2022 10:36:41 +0200 Subject: Track tree references that have to be expanded ... as this is relevant for performance of analysis. We log the total numer of trees at performance level and the individual directories at debug level, if requested. --- src/buildtool/common/statistics.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/buildtool/common/statistics.hpp') diff --git a/src/buildtool/common/statistics.hpp b/src/buildtool/common/statistics.hpp index e34ccd03..071fc199 100644 --- a/src/buildtool/common/statistics.hpp +++ b/src/buildtool/common/statistics.hpp @@ -18,6 +18,7 @@ class Statistics { num_actions_flaky_tainted_ = 0; num_rebuilt_actions_compared_ = 0; num_rebuilt_actions_missing_ = 0; + num_trees_analysed_ = 0; } void IncrementActionsQueuedCounter() noexcept { ++num_actions_queued_; } void IncrementActionsExecutedCounter() noexcept { ++num_actions_executed_; } @@ -37,6 +38,7 @@ class Statistics { void IncrementExportsNotEligibleCounter() noexcept { ++num_exports_not_eligible_; } + void IncrementTreesAnalysedCounter() noexcept { ++num_trees_analysed_; } [[nodiscard]] auto ActionsQueuedCounter() const noexcept -> int { return num_actions_queued_; } @@ -67,6 +69,9 @@ class Statistics { [[nodiscard]] auto ExportsNotEligibleCounter() const noexcept -> int { return num_exports_not_eligible_; } + [[nodiscard]] auto TreesAnalysedCounter() const noexcept -> int { + return num_trees_analysed_; + } private: std::atomic num_actions_queued_{}; @@ -79,6 +84,7 @@ class Statistics { std::atomic num_exports_cached_{}; std::atomic num_exports_uncached_{}; std::atomic num_exports_not_eligible_{}; + std::atomic num_trees_analysed_{}; }; #endif // INCLUDED_SRC_BUILDTOOL_COMMON_STATISTICS_HPP -- cgit v1.2.3