|
PACS System 0.1.0
PACS DICOM system library
|
Collector for DICOM storage and data transfer metrics. More...
#include <dicom_storage_collector.h>

Public Member Functions | |
| dicom_storage_collector (std::string ae_title="PACS_SCP") | |
| Default constructor. | |
| ~dicom_storage_collector ()=default | |
| Destructor. | |
| dicom_storage_collector (const dicom_storage_collector &)=delete | |
| dicom_storage_collector & | operator= (const dicom_storage_collector &)=delete |
| dicom_storage_collector (dicom_storage_collector &&)=delete | |
| dicom_storage_collector & | operator= (dicom_storage_collector &&)=delete |
| bool | initialize (const std::unordered_map< std::string, std::string > &config) |
| Initialize the collector with configuration. | |
| std::vector< storage_metric > | collect () |
| Collect current storage metrics. | |
| std::string | get_name () const |
| Get the collector name. | |
| std::vector< std::string > | get_metric_types () const |
| Get supported metric types. | |
| bool | is_healthy () const |
| Check if the collector is healthy. | |
| std::unordered_map< std::string, double > | get_statistics () const |
| Get collector statistics. | |
| void | set_ae_title (std::string ae_title) |
| Set the AE title for metric labels. | |
| std::string | get_ae_title () const |
| Get the current AE title. | |
| void | set_pool_metrics_enabled (bool enabled) |
| Enable or disable pool metrics collection. | |
| bool | is_pool_metrics_enabled () const |
| Check if pool metrics collection is enabled. | |
Private Member Functions | |
| void | collect_transfer_metrics (std::vector< storage_metric > &metrics) |
| void | collect_pool_metrics (std::vector< storage_metric > &metrics) |
| storage_metric | create_metric (const std::string &name, double value, const std::string &type, const std::string &unit="") const |
Private Attributes | |
| std::string | ae_title_ |
| bool | initialized_ {false} |
| bool | collect_pool_metrics_ {true} |
| std::mutex | stats_mutex_ |
| std::uint64_t | collection_count_ {0} |
| std::chrono::steady_clock::time_point | init_time_ |
| std::uint64_t | prev_bytes_sent_ {0} |
| std::uint64_t | prev_bytes_received_ {0} |
| std::chrono::steady_clock::time_point | prev_collection_time_ |
Collector for DICOM storage and data transfer metrics.
This collector gathers metrics related to DICOM storage including:
Thread Safety: All public methods are thread-safe.
Definition at line 81 of file dicom_storage_collector.h.
|
inlineexplicit |
Default constructor.
| ae_title | Optional AE title for labeling metrics |
Definition at line 205 of file dicom_storage_collector.h.
|
default |
|
delete |
|
delete |
|
inlinenodiscard |
Collect current storage metrics.
Definition at line 226 of file dicom_storage_collector.h.
References collect_pool_metrics(), collect_pool_metrics_, collect_transfer_metrics(), collection_count_, initialized_, and stats_mutex_.

|
inlineprivate |
Definition at line 322 of file dicom_storage_collector.h.
References create_metric(), and kcenon::pacs::monitoring::pacs_metrics::global_metrics().
Referenced by collect().


|
inlineprivate |
Definition at line 250 of file dicom_storage_collector.h.
References create_metric(), kcenon::pacs::monitoring::pacs_metrics::global_metrics(), prev_bytes_received_, prev_bytes_sent_, prev_collection_time_, and kcenon::pacs::monitoring::pacs_metrics::transfer().
Referenced by collect().


|
inlinenodiscardprivate |
Definition at line 451 of file dicom_storage_collector.h.
References ae_title_, and name.
Referenced by collect_pool_metrics(), and collect_transfer_metrics().

|
inlinenodiscard |
Get the current AE title.
Definition at line 439 of file dicom_storage_collector.h.
References ae_title_.
|
inlinenodiscard |
Get supported metric types.
Definition at line 386 of file dicom_storage_collector.h.
References collect_pool_metrics_.
|
inlinenodiscard |
Get the collector name.
Definition at line 382 of file dicom_storage_collector.h.
|
inlinenodiscard |
Get collector statistics.
Definition at line 420 of file dicom_storage_collector.h.
References collection_count_, init_time_, initialized_, and stats_mutex_.
|
inlinenodiscard |
Initialize the collector with configuration.
| config | Configuration map |
Definition at line 208 of file dicom_storage_collector.h.
References ae_title_, collect_pool_metrics_, init_time_, initialized_, and prev_collection_time_.
|
inlinenodiscard |
Check if the collector is healthy.
Definition at line 415 of file dicom_storage_collector.h.
References initialized_.
|
inlinenodiscard |
Check if pool metrics collection is enabled.
Definition at line 447 of file dicom_storage_collector.h.
References collect_pool_metrics_.
|
delete |
|
delete |
|
inline |
Set the AE title for metric labels.
| ae_title | The Application Entity title |
Definition at line 435 of file dicom_storage_collector.h.
References ae_title_.
|
inline |
Enable or disable pool metrics collection.
| enabled | Whether to collect pool metrics |
Definition at line 443 of file dicom_storage_collector.h.
References collect_pool_metrics_.
|
private |
Definition at line 176 of file dicom_storage_collector.h.
Referenced by create_metric(), get_ae_title(), initialize(), and set_ae_title().
|
private |
Definition at line 178 of file dicom_storage_collector.h.
Referenced by collect(), get_metric_types(), initialize(), is_pool_metrics_enabled(), and set_pool_metrics_enabled().
|
private |
Definition at line 182 of file dicom_storage_collector.h.
Referenced by collect(), and get_statistics().
|
private |
Definition at line 183 of file dicom_storage_collector.h.
Referenced by get_statistics(), and initialize().
|
private |
Definition at line 177 of file dicom_storage_collector.h.
Referenced by collect(), get_statistics(), initialize(), and is_healthy().
|
private |
Definition at line 187 of file dicom_storage_collector.h.
Referenced by collect_transfer_metrics().
|
private |
Definition at line 186 of file dicom_storage_collector.h.
Referenced by collect_transfer_metrics().
|
private |
Definition at line 188 of file dicom_storage_collector.h.
Referenced by collect_transfer_metrics(), and initialize().
|
mutableprivate |
Definition at line 181 of file dicom_storage_collector.h.
Referenced by collect(), and get_statistics().