diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-03-07 15:44:28 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-03-11 15:59:05 +0100 |
commit | 5f6ff55e97104e46c1b5c2c94b39ea0fca35ca7c (patch) | |
tree | 9a8a70d311f2c55c20f426258455f9fb3037328a /src/buildtool/common/statistics.hpp | |
parent | b885deebf9fc02b9f1e849d91de93fadcfb71a73 (diff) | |
download | justbuild-5f6ff55e97104e46c1b5c2c94b39ea0fca35ca7c.tar.gz |
just: Replace singletons for progress tracking and statistics...
...with regular instances that have controlled life-times.
This avoids race conditions in tracking and reporting the results
of analysis and build, as the serve endpoint can orchestrate
multiple builds at the same time asynchronously. As a bonus
side-effect this also ensures the correctness of the progress
reporting per orchestrated build.
Diffstat (limited to 'src/buildtool/common/statistics.hpp')
-rw-r--r-- | src/buildtool/common/statistics.hpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/buildtool/common/statistics.hpp b/src/buildtool/common/statistics.hpp index e8987d74..4022db15 100644 --- a/src/buildtool/common/statistics.hpp +++ b/src/buildtool/common/statistics.hpp @@ -19,11 +19,6 @@ class Statistics { public: - [[nodiscard]] static auto Instance() noexcept -> Statistics& { - static Statistics instance{}; - return instance; - } - void Reset() noexcept { num_actions_queued_ = 0; num_actions_executed_ = 0; |