summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2022-06-13 13:30:13 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2022-06-13 15:55:41 +0200
commit2ea2918975af3cc78b920b0d0ff863139181d807 (patch)
tree44c3cbcd306a0a5aca2bbbde482acd189bffa57d /src
parent036508be71ebe51102af7ca4a4aa8055445b75a9 (diff)
downloadjustbuild-2ea2918975af3cc78b920b0d0ff863139181d807.tar.gz
Statistics: Add counters for export targets
Diffstat (limited to 'src')
-rw-r--r--src/buildtool/common/statistics.hpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/buildtool/common/statistics.hpp b/src/buildtool/common/statistics.hpp
index 6ddcf7d3..e34ccd03 100644
--- a/src/buildtool/common/statistics.hpp
+++ b/src/buildtool/common/statistics.hpp
@@ -32,6 +32,11 @@ class Statistics {
void IncrementRebuiltActionComparedCounter() noexcept {
++num_rebuilt_actions_compared_;
}
+ void IncrementExportsCachedCounter() noexcept { ++num_exports_cached_; }
+ void IncrementExportsUncachedCounter() noexcept { ++num_exports_uncached_; }
+ void IncrementExportsNotEligibleCounter() noexcept {
+ ++num_exports_not_eligible_;
+ }
[[nodiscard]] auto ActionsQueuedCounter() const noexcept -> int {
return num_actions_queued_;
}
@@ -53,6 +58,15 @@ class Statistics {
[[nodiscard]] auto RebuiltActionComparedCounter() const noexcept -> int {
return num_rebuilt_actions_compared_;
}
+ [[nodiscard]] auto ExportsCachedCounter() const noexcept -> int {
+ return num_exports_cached_;
+ }
+ [[nodiscard]] auto ExportsUncachedCounter() const noexcept -> int {
+ return num_exports_uncached_;
+ }
+ [[nodiscard]] auto ExportsNotEligibleCounter() const noexcept -> int {
+ return num_exports_not_eligible_;
+ }
private:
std::atomic<int> num_actions_queued_{};
@@ -62,6 +76,9 @@ class Statistics {
std::atomic<int> num_actions_flaky_tainted_{};
std::atomic<int> num_rebuilt_actions_missing_{};
std::atomic<int> num_rebuilt_actions_compared_{};
+ std::atomic<int> num_exports_cached_{};
+ std::atomic<int> num_exports_uncached_{};
+ std::atomic<int> num_exports_not_eligible_{};
};
#endif // INCLUDED_SRC_BUILDTOOL_COMMON_STATISTICS_HPP