|
PACS System 0.1.0
PACS DICOM system library
|
CRTP-based unified DICOM metrics collector. More...
#include <dicom_metrics_collector.h>


Public Member Functions | |
| dicom_metrics_collector ()=default | |
| Default constructor. | |
| dicom_metrics_collector (std::string ae_title) | |
| Constructor with AE title. | |
| ~dicom_metrics_collector () override=default | |
| Destructor. | |
| dicom_metrics_collector (const dicom_metrics_collector &)=delete | |
| dicom_metrics_collector & | operator= (const dicom_metrics_collector &)=delete |
| dicom_metrics_collector (dicom_metrics_collector &&)=delete | |
| dicom_metrics_collector & | operator= (dicom_metrics_collector &&)=delete |
| bool | do_initialize (const config_map &config) |
| Collector-specific initialization. | |
| std::vector< dicom_metric > | do_collect () |
| Collect all DICOM metrics. | |
| bool | is_available () const |
| Check if DICOM metrics collection is available. | |
| std::vector< std::string > | do_get_metric_types () const |
| Get supported metric types. | |
| void | do_add_statistics (stats_map &stats) const |
| Add collector-specific statistics. | |
| dicom_metrics_snapshot | get_snapshot () const |
| Get a snapshot of current metrics. | |
| dicom_metrics_snapshot | get_last_snapshot () const |
| Get last collected snapshot. | |
| void | set_collect_associations (bool enabled) |
| Enable or disable association metrics collection. | |
| void | set_collect_transfers (bool enabled) |
| Enable or disable transfer metrics collection. | |
| void | set_collect_storage (bool enabled) |
| Enable or disable storage metrics collection. | |
| void | set_collect_queries (bool enabled) |
| Enable or disable query metrics collection. | |
| void | set_collect_pools (bool enabled) |
| Enable or disable pool metrics collection. | |
Public Member Functions inherited from kcenon::pacs::monitoring::dicom_collector_base< dicom_metrics_collector > | |
| dicom_collector_base ()=default | |
| dicom_collector_base (const dicom_collector_base &)=delete | |
| dicom_collector_base (dicom_collector_base &&)=delete | |
| virtual | ~dicom_collector_base ()=default |
| dicom_collector_base & | operator= (const dicom_collector_base &)=delete |
| dicom_collector_base & | operator= (dicom_collector_base &&)=delete |
| bool | initialize (const config_map &config) |
| Initialize the collector with configuration. | |
| std::vector< dicom_metric > | collect () |
| Collect metrics from the data source. | |
| std::string | get_name () const |
| Get the name of this collector. | |
| std::vector< std::string > | get_metric_types () const |
| Get supported metric types. | |
| bool | is_healthy () const |
| Check if the collector is healthy. | |
| stats_map | get_statistics () const |
| Get collector statistics. | |
| bool | is_enabled () const |
| Check if collector is enabled. | |
| std::size_t | get_collection_count () const |
| Get collection count. | |
| std::size_t | get_collection_errors () const |
| Get error count. | |
| std::string | get_ae_title () const |
| Get the AE title. | |
| void | set_ae_title (std::string ae_title) |
| Set the AE title. | |
Static Public Attributes | |
| static constexpr const char * | collector_name = "dicom_metrics_collector" |
| Collector name for CRTP base class. | |
Private Member Functions | |
| void | collect_association_metrics (std::vector< dicom_metric > &metrics) |
| void | collect_transfer_metrics (std::vector< dicom_metric > &metrics) |
| void | collect_storage_metrics (std::vector< dicom_metric > &metrics) |
| void | collect_query_metrics (std::vector< dicom_metric > &metrics) |
| void | collect_pool_metrics (std::vector< dicom_metric > &metrics) |
| void | collect_dimse_operation_metrics (std::vector< dicom_metric > &metrics, const std::string &op_name, const operation_counter &counter) |
Private Attributes | |
| bool | collect_associations_ {true} |
| bool | collect_transfers_ {true} |
| bool | collect_storage_ {true} |
| bool | collect_queries_ {true} |
| bool | collect_pools_ {true} |
| std::mutex | snapshot_mutex_ |
| dicom_metrics_snapshot | last_snapshot_ |
Additional Inherited Members | |
Protected Member Functions inherited from kcenon::pacs::monitoring::dicom_collector_base< dicom_metrics_collector > | |
| dicom_metric | create_base_metric (const std::string &name, double value, const std::string &type, const std::unordered_map< std::string, std::string > &extra_tags={}) const |
| Create a metric with common tags. | |
Protected Attributes inherited from kcenon::pacs::monitoring::dicom_collector_base< dicom_metrics_collector > | |
| bool | enabled_ |
| std::string | ae_title_ |
| std::mutex | stats_mutex_ |
| std::atomic< std::size_t > | collection_count_ |
| std::atomic< std::size_t > | collection_errors_ |
| std::chrono::steady_clock::time_point | init_time_ |
| std::chrono::system_clock::time_point | last_collection_time_ |
CRTP-based unified DICOM metrics collector.
This collector gathers all DICOM-related metrics in a single, efficient collection pass, following the monitoring_system's CRTP collector pattern.
Collected metrics include:
Performance targets (based on monitoring_system benchmarks):
Thread Safety: All public methods are thread-safe.
Definition at line 108 of file dicom_metrics_collector.h.
|
default |
Default constructor.
|
inlineexplicit |
Constructor with AE title.
| ae_title | Application Entity title for metric labels |
Definition at line 258 of file dicom_metrics_collector.h.
References kcenon::pacs::monitoring::dicom_collector_base< dicom_metrics_collector >::ae_title_.
|
overridedefault |
|
delete |
|
delete |
|
inlineprivate |
Definition at line 435 of file dicom_metrics_collector.h.
References kcenon::pacs::monitoring::pacs_metrics::associations(), kcenon::pacs::monitoring::dicom_collector_base< dicom_metrics_collector >::create_base_metric(), and kcenon::pacs::monitoring::pacs_metrics::global_metrics().
Referenced by do_collect().


|
inlineprivate |
Definition at line 629 of file dicom_metrics_collector.h.
References kcenon::pacs::monitoring::counter.
Referenced by collect_query_metrics(), and collect_storage_metrics().

|
inlineprivate |
Definition at line 554 of file dicom_metrics_collector.h.
References kcenon::pacs::monitoring::dicom_collector_base< dicom_metrics_collector >::create_base_metric(), and kcenon::pacs::monitoring::pacs_metrics::global_metrics().
Referenced by do_collect().


|
inlineprivate |
Definition at line 524 of file dicom_metrics_collector.h.
References kcenon::pacs::monitoring::c_echo, kcenon::pacs::monitoring::c_find, kcenon::pacs::monitoring::c_get, kcenon::pacs::monitoring::c_move, collect_dimse_operation_metrics(), kcenon::pacs::monitoring::pacs_metrics::global_metrics(), kcenon::pacs::monitoring::n_action, kcenon::pacs::monitoring::n_create, kcenon::pacs::monitoring::n_delete, kcenon::pacs::monitoring::n_event, kcenon::pacs::monitoring::n_get, and kcenon::pacs::monitoring::n_set.
Referenced by do_collect().


|
inlineprivate |
Definition at line 514 of file dicom_metrics_collector.h.
References kcenon::pacs::monitoring::c_store, collect_dimse_operation_metrics(), and kcenon::pacs::monitoring::pacs_metrics::global_metrics().
Referenced by do_collect().


|
inlineprivate |
Definition at line 484 of file dicom_metrics_collector.h.
References kcenon::pacs::monitoring::dicom_collector_base< dicom_metrics_collector >::create_base_metric(), kcenon::pacs::monitoring::pacs_metrics::global_metrics(), and kcenon::pacs::monitoring::pacs_metrics::transfer().
Referenced by do_collect().


|
inline |
Add collector-specific statistics.
| stats | Map to add statistics to |
Definition at line 348 of file dicom_metrics_collector.h.
References kcenon::pacs::monitoring::dicom_metrics_snapshot::active_associations, kcenon::pacs::monitoring::dicom_metrics_snapshot::bytes_received, kcenon::pacs::monitoring::dicom_metrics_snapshot::bytes_sent, kcenon::pacs::monitoring::dicom_metrics_snapshot::images_received, kcenon::pacs::monitoring::dicom_metrics_snapshot::images_sent, last_snapshot_, and snapshot_mutex_.
|
inline |
Collect all DICOM metrics.
Definition at line 283 of file dicom_metrics_collector.h.
References collect_association_metrics(), collect_associations_, collect_pool_metrics(), collect_pools_, collect_queries_, collect_query_metrics(), collect_storage_, collect_storage_metrics(), collect_transfer_metrics(), and collect_transfers_.

|
inlinenodiscard |
Get supported metric types.
Definition at line 310 of file dicom_metrics_collector.h.
|
inline |
Collector-specific initialization.
| config | Configuration options:
|
Definition at line 262 of file dicom_metrics_collector.h.
References collect_associations_, collect_pools_, collect_queries_, collect_storage_, and collect_transfers_.
|
inlinenodiscard |
Get last collected snapshot.
Definition at line 410 of file dicom_metrics_collector.h.
References last_snapshot_, and snapshot_mutex_.
|
inlinenodiscard |
Get a snapshot of current metrics.
Definition at line 359 of file dicom_metrics_collector.h.
References kcenon::pacs::monitoring::dicom_metrics_snapshot::active_associations, kcenon::pacs::monitoring::dicom_metrics_snapshot::avg_query_latency_ms, kcenon::pacs::monitoring::dicom_metrics_snapshot::avg_store_latency_ms, kcenon::pacs::monitoring::dicom_metrics_snapshot::bytes_received, kcenon::pacs::monitoring::dicom_metrics_snapshot::bytes_sent, kcenon::pacs::monitoring::c_find, kcenon::pacs::monitoring::c_store, kcenon::pacs::monitoring::dicom_metrics_snapshot::failed_associations, kcenon::pacs::monitoring::dicom_metrics_snapshot::failed_queries, kcenon::pacs::monitoring::dicom_metrics_snapshot::failed_stores, kcenon::pacs::monitoring::pacs_metrics::global_metrics(), kcenon::pacs::monitoring::dicom_metrics_snapshot::images_received, kcenon::pacs::monitoring::dicom_metrics_snapshot::images_sent, kcenon::pacs::monitoring::dicom_metrics_snapshot::peak_active_associations, kcenon::pacs::monitoring::dicom_metrics_snapshot::query_operations, kcenon::pacs::monitoring::dicom_metrics_snapshot::store_operations, kcenon::pacs::monitoring::dicom_metrics_snapshot::successful_queries, kcenon::pacs::monitoring::dicom_metrics_snapshot::successful_stores, kcenon::pacs::monitoring::dicom_metrics_snapshot::timestamp, and kcenon::pacs::monitoring::dicom_metrics_snapshot::total_associations.

|
inlinenodiscard |
Check if DICOM metrics collection is available.
Definition at line 306 of file dicom_metrics_collector.h.
|
delete |
|
delete |
|
inline |
Enable or disable association metrics collection.
| enabled | Whether to collect association metrics |
Definition at line 415 of file dicom_metrics_collector.h.
References collect_associations_.
|
inline |
Enable or disable pool metrics collection.
| enabled | Whether to collect pool metrics |
Definition at line 431 of file dicom_metrics_collector.h.
References collect_pools_.
|
inline |
Enable or disable query metrics collection.
| enabled | Whether to collect query metrics |
Definition at line 427 of file dicom_metrics_collector.h.
References collect_queries_.
|
inline |
Enable or disable storage metrics collection.
| enabled | Whether to collect storage metrics |
Definition at line 423 of file dicom_metrics_collector.h.
References collect_storage_.
|
inline |
Enable or disable transfer metrics collection.
| enabled | Whether to collect transfer metrics |
Definition at line 419 of file dicom_metrics_collector.h.
References collect_transfers_.
|
private |
Definition at line 232 of file dicom_metrics_collector.h.
Referenced by do_collect(), do_initialize(), and set_collect_associations().
|
private |
Definition at line 236 of file dicom_metrics_collector.h.
Referenced by do_collect(), do_initialize(), and set_collect_pools().
|
private |
Definition at line 235 of file dicom_metrics_collector.h.
Referenced by do_collect(), do_initialize(), and set_collect_queries().
|
private |
Definition at line 234 of file dicom_metrics_collector.h.
Referenced by do_collect(), do_initialize(), and set_collect_storage().
|
private |
Definition at line 233 of file dicom_metrics_collector.h.
Referenced by do_collect(), do_initialize(), and set_collect_transfers().
|
staticconstexpr |
Collector name for CRTP base class.
Definition at line 112 of file dicom_metrics_collector.h.
|
private |
Definition at line 240 of file dicom_metrics_collector.h.
Referenced by do_add_statistics(), and get_last_snapshot().
|
mutableprivate |
Definition at line 239 of file dicom_metrics_collector.h.
Referenced by do_add_statistics(), and get_last_snapshot().