diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-08-22 10:36:41 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-08-23 10:18:41 +0200 |
commit | bc9fa36c65183a0b8e14b37c9aa2e07ce768463e (patch) | |
tree | 0e279147f1c993aba2596c6c316467dcfa0a2dcd /src/buildtool/common/statistics.hpp | |
parent | 1e8066caaa711b9ab9f76b25873327779924fda6 (diff) | |
download | justbuild-bc9fa36c65183a0b8e14b37c9aa2e07ce768463e.tar.gz |
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.
Diffstat (limited to 'src/buildtool/common/statistics.hpp')
-rw-r--r-- | src/buildtool/common/statistics.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
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<int> num_actions_queued_{}; @@ -79,6 +84,7 @@ class Statistics { std::atomic<int> num_exports_cached_{}; std::atomic<int> num_exports_uncached_{}; std::atomic<int> num_exports_not_eligible_{}; + std::atomic<int> num_trees_analysed_{}; }; #endif // INCLUDED_SRC_BUILDTOOL_COMMON_STATISTICS_HPP |