|
PACS System 0.1.0
PACS DICOM system library
|
Collector for DICOM DIMSE service operation metrics. More...
#include <dicom_service_collector.h>

Public Member Functions | |
| dicom_service_collector (std::string ae_title="PACS_SCP") | |
| Default constructor. | |
| ~dicom_service_collector ()=default | |
| Destructor. | |
| dicom_service_collector (const dicom_service_collector &)=delete | |
| dicom_service_collector & | operator= (const dicom_service_collector &)=delete |
| dicom_service_collector (dicom_service_collector &&)=delete | |
| dicom_service_collector & | operator= (dicom_service_collector &&)=delete |
| bool | initialize (const std::unordered_map< std::string, std::string > &config) |
| Initialize the collector with configuration. | |
| std::vector< service_metric > | collect () |
| Collect current DIMSE service 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_operation_enabled (dimse_operation op, bool enabled) |
| Enable or disable specific operation metrics. | |
| bool | is_operation_enabled (dimse_operation op) const |
| Check if metrics are enabled for an operation. | |
Private Member Functions | |
| void | collect_operation_metrics (std::vector< service_metric > &metrics, dimse_operation op, const operation_counter &counter) |
| service_metric | create_metric (const std::string &name, double value, const std::string &type, const std::string &operation) const |
Private Attributes | |
| std::string | ae_title_ |
| bool | initialized_ {false} |
| std::array< bool, 11 > | operation_enabled_ |
| std::mutex | stats_mutex_ |
| std::uint64_t | collection_count_ {0} |
| std::chrono::steady_clock::time_point | init_time_ |
Collector for DICOM DIMSE service operation metrics.
This collector gathers metrics for all DIMSE operations including:
For each operation, the collector reports:
Thread Safety: All public methods are thread-safe.
Definition at line 87 of file dicom_service_collector.h.
|
inlineexplicit |
Default constructor.
| ae_title | Optional AE title for labeling metrics |
Definition at line 215 of file dicom_service_collector.h.
|
default |
|
delete |
|
delete |
|
inlinenodiscard |
Collect current DIMSE service metrics.
Definition at line 230 of file dicom_service_collector.h.
References kcenon::pacs::monitoring::c_echo, kcenon::pacs::monitoring::c_find, kcenon::pacs::monitoring::c_get, kcenon::pacs::monitoring::c_move, kcenon::pacs::monitoring::c_store, collect_operation_metrics(), collection_count_, kcenon::pacs::monitoring::pacs_metrics::global_metrics(), initialized_, 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, kcenon::pacs::monitoring::n_set, operation_enabled_, and stats_mutex_.

|
inlineprivate |
Definition at line 272 of file dicom_service_collector.h.
References kcenon::pacs::monitoring::counter, create_metric(), and kcenon::pacs::monitoring::to_string().
Referenced by collect().


|
inlinenodiscardprivate |
Definition at line 411 of file dicom_service_collector.h.
References ae_title_, and name.
Referenced by collect_operation_metrics().

|
inlinenodiscard |
Get the current AE title.
Definition at line 397 of file dicom_service_collector.h.
References ae_title_.
|
inlinenodiscard |
Get supported metric types.
Definition at line 342 of file dicom_service_collector.h.
References kcenon::pacs::monitoring::c_echo, kcenon::pacs::monitoring::c_find, kcenon::pacs::monitoring::c_get, kcenon::pacs::monitoring::c_move, kcenon::pacs::monitoring::c_store, 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, kcenon::pacs::monitoring::n_set, and kcenon::pacs::monitoring::to_string().

|
inlinenodiscard |
Get the collector name.
Definition at line 338 of file dicom_service_collector.h.
|
inlinenodiscard |
Get collector statistics.
Definition at line 378 of file dicom_service_collector.h.
References collection_count_, init_time_, initialized_, and stats_mutex_.
|
inlinenodiscard |
Initialize the collector with configuration.
| config | Configuration map |
Definition at line 218 of file dicom_service_collector.h.
References ae_title_, init_time_, and initialized_.
|
inlinenodiscard |
Check if the collector is healthy.
Definition at line 373 of file dicom_service_collector.h.
References initialized_.
|
inlinenodiscard |
Check if metrics are enabled for an operation.
| op | The DIMSE operation |
Definition at line 407 of file dicom_service_collector.h.
References operation_enabled_.
|
delete |
|
delete |
|
inline |
Set the AE title for metric labels.
| ae_title | The Application Entity title |
Definition at line 393 of file dicom_service_collector.h.
References ae_title_.
|
inline |
Enable or disable specific operation metrics.
| op | The DIMSE operation |
| enabled | Whether to collect metrics for this operation |
Definition at line 401 of file dicom_service_collector.h.
References operation_enabled_.
|
private |
Definition at line 184 of file dicom_service_collector.h.
Referenced by create_metric(), get_ae_title(), initialize(), and set_ae_title().
|
private |
Definition at line 195 of file dicom_service_collector.h.
Referenced by collect(), and get_statistics().
|
private |
Definition at line 196 of file dicom_service_collector.h.
Referenced by get_statistics(), and initialize().
|
private |
Definition at line 185 of file dicom_service_collector.h.
Referenced by collect(), get_statistics(), initialize(), and is_healthy().
|
private |
Definition at line 188 of file dicom_service_collector.h.
Referenced by collect(), is_operation_enabled(), and set_operation_enabled().
|
mutableprivate |
Definition at line 194 of file dicom_service_collector.h.
Referenced by collect(), and get_statistics().