|
PACS System 0.1.0
PACS DICOM system library
|
Metrics for tracking object pool usage. More...
#include <pacs_metrics.h>

Public Member Functions | |
| double | hit_ratio () const noexcept |
| Calculate hit ratio (0.0 to 1.0) | |
| void | record_acquisition (bool was_pool_hit) noexcept |
| Record a pool acquisition (hit or miss) | |
| void | record_release () noexcept |
| Record a pool release. | |
| void | set_pool_size (std::uint32_t size) noexcept |
| Update current pool size. | |
| void | reset () noexcept |
| Reset all counters to zero. | |
Public Attributes | |
| std::atomic< std::uint64_t > | total_acquisitions {0} |
| std::atomic< std::uint64_t > | pool_hits {0} |
| std::atomic< std::uint64_t > | pool_misses {0} |
| std::atomic< std::uint64_t > | total_releases {0} |
| std::atomic< std::uint32_t > | current_pool_size {0} |
Metrics for tracking object pool usage.
Thread-safe counters for tracking pool hit/miss ratios and allocation statistics to monitor memory pool effectiveness.
Definition at line 278 of file pacs_metrics.h.
|
inlinenodiscardnoexcept |
Calculate hit ratio (0.0 to 1.0)
Definition at line 286 of file pacs_metrics.h.
References pool_hits, and total_acquisitions.
|
inlinenoexcept |
Record a pool acquisition (hit or miss)
Definition at line 296 of file pacs_metrics.h.
References pool_hits, pool_misses, and total_acquisitions.
|
inlinenoexcept |
Record a pool release.
Definition at line 306 of file pacs_metrics.h.
References total_releases.
|
inlinenoexcept |
Reset all counters to zero.
Definition at line 316 of file pacs_metrics.h.
References current_pool_size, pool_hits, pool_misses, total_acquisitions, and total_releases.
Referenced by kcenon::pacs::monitoring::pacs_metrics::reset().

|
inlinenoexcept |
Update current pool size.
Definition at line 311 of file pacs_metrics.h.
References current_pool_size.
| std::atomic<std::uint32_t> kcenon::pacs::monitoring::pool_counters::current_pool_size {0} |
| std::atomic<std::uint64_t> kcenon::pacs::monitoring::pool_counters::pool_hits {0} |
Definition at line 280 of file pacs_metrics.h.
Referenced by hit_ratio(), record_acquisition(), and reset().
| std::atomic<std::uint64_t> kcenon::pacs::monitoring::pool_counters::pool_misses {0} |
Definition at line 281 of file pacs_metrics.h.
Referenced by record_acquisition(), and reset().
| std::atomic<std::uint64_t> kcenon::pacs::monitoring::pool_counters::total_acquisitions {0} |
Definition at line 279 of file pacs_metrics.h.
Referenced by hit_ratio(), record_acquisition(), and reset().
| std::atomic<std::uint64_t> kcenon::pacs::monitoring::pool_counters::total_releases {0} |