|
PACS System 0.1.0
PACS DICOM system library
|
Centralized metrics collection for the entire pipeline. More...
#include <pipeline_metrics.h>

Public Member Functions | |
| pipeline_metrics ()=default | |
| Default constructor. | |
| pipeline_metrics (const pipeline_metrics &)=delete | |
| pipeline_metrics & | operator= (const pipeline_metrics &)=delete |
| pipeline_metrics (pipeline_metrics &&)=delete | |
| pipeline_metrics & | operator= (pipeline_metrics &&)=delete |
| auto | get_stage_metrics (pipeline_stage stage) noexcept -> stage_metrics & |
| Get metrics for a specific stage. | |
| auto | get_stage_metrics (pipeline_stage stage) const noexcept -> const stage_metrics & |
| Get metrics for a specific stage (const) | |
| void | record_stage_completion (pipeline_stage stage, uint64_t processing_time_ns, bool success) noexcept |
| Record a stage job completion. | |
| void | increment_stage_queue (pipeline_stage stage) noexcept |
| Increment queued job count for a stage. | |
| void | decrement_stage_queue (pipeline_stage stage) noexcept |
| Decrement queued job count for a stage. | |
| auto | get_category_metrics (job_category category) noexcept -> category_metrics & |
| Get metrics for a specific category. | |
| auto | get_category_metrics (job_category category) const noexcept -> const category_metrics & |
| Get metrics for a specific category (const) | |
| void | record_operation_completion (job_category category, uint64_t latency_ns, bool success) noexcept |
| Record an operation completion. | |
| auto | get_total_operations () const noexcept -> uint64_t |
| Get total operations processed. | |
| auto | get_active_associations () const noexcept -> uint32_t |
| Get current number of active associations. | |
| void | increment_active_associations () noexcept |
| Increment active association count. | |
| void | decrement_active_associations () noexcept |
| Decrement active association count. | |
| auto | get_peak_associations () const noexcept -> uint32_t |
| Get peak concurrent associations. | |
| void | reset () noexcept |
| Reset all metrics. | |
| void | mark_start_time () noexcept |
| Mark the start time for throughput calculation. | |
| auto | get_throughput_per_second (job_category category) const noexcept -> double |
| Calculate throughput for a category (operations per second) | |
Static Public Attributes | |
| static constexpr size_t | stage_count |
| Number of pipeline stages. | |
| static constexpr size_t | category_count = 8 |
| Number of job categories. | |
Private Attributes | |
| std::array< stage_metrics, stage_count > | stage_metrics_ |
| std::array< category_metrics, category_count > | category_metrics_ |
| std::atomic< uint64_t > | total_operations_ {0} |
| std::atomic< uint32_t > | active_associations_ {0} |
| std::atomic< uint32_t > | peak_associations_ {0} |
| std::chrono::steady_clock::time_point | start_time_ {std::chrono::steady_clock::now()} |
Centralized metrics collection for the entire pipeline.
Provides thread-safe metrics collection with minimal overhead using atomic operations and relaxed memory ordering where safe.
Definition at line 204 of file pipeline_metrics.h.
|
default |
Default constructor.
|
delete |
|
delete |
|
inlinenoexcept |
Decrement active association count.
Definition at line 344 of file pipeline_metrics.h.
References active_associations_.
|
inlinenoexcept |
Decrement queued job count for a stage.
Definition at line 269 of file pipeline_metrics.h.
References stage_metrics_.
|
inlinenodiscardnoexcept |
Get current number of active associations.
Definition at line 323 of file pipeline_metrics.h.
References active_associations_.
|
inlinenodiscardnoexcept |
Get metrics for a specific category (const)
Definition at line 291 of file pipeline_metrics.h.
References category_metrics_.
|
inlinenodiscardnoexcept |
Get metrics for a specific category.
| category | The job category |
Definition at line 283 of file pipeline_metrics.h.
References category_metrics_.
|
inlinenodiscardnoexcept |
Get peak concurrent associations.
Definition at line 351 of file pipeline_metrics.h.
References peak_associations_.
|
inlinenodiscardnoexcept |
Get metrics for a specific stage (const)
Definition at line 241 of file pipeline_metrics.h.
References stage_metrics_.
|
inlinenodiscardnoexcept |
Get metrics for a specific stage.
| stage | The pipeline stage |
Definition at line 233 of file pipeline_metrics.h.
References stage_metrics_.
|
inlinenodiscardnoexcept |
Calculate throughput for a category (operations per second)
| category | The job category |
Definition at line 385 of file pipeline_metrics.h.
References category_metrics_, and start_time_.
|
inlinenodiscardnoexcept |
Get total operations processed.
Definition at line 316 of file pipeline_metrics.h.
References total_operations_.
|
inlinenoexcept |
Increment active association count.
Definition at line 330 of file pipeline_metrics.h.
References active_associations_, and peak_associations_.
|
inlinenoexcept |
Increment queued job count for a stage.
Definition at line 261 of file pipeline_metrics.h.
References stage_metrics_.
|
inlinenoexcept |
Mark the start time for throughput calculation.
Definition at line 376 of file pipeline_metrics.h.
References start_time_.
Referenced by kcenon::pacs::network::pipeline::pipeline_coordinator::reset_metrics().

|
delete |
|
delete |
|
inlinenoexcept |
Record an operation completion.
| category | The job category |
| latency_ns | End-to-end latency in nanoseconds |
| success | Whether the operation succeeded |
Definition at line 302 of file pipeline_metrics.h.
References category_metrics_, kcenon::pacs::network::pipeline::success, and total_operations_.
|
inlinenoexcept |
Record a stage job completion.
| stage | The pipeline stage |
| processing_time_ns | Processing time in nanoseconds |
| success | Whether the job succeeded |
Definition at line 252 of file pipeline_metrics.h.
References stage_metrics_, and kcenon::pacs::network::pipeline::success.
|
inlinenoexcept |
Reset all metrics.
Definition at line 362 of file pipeline_metrics.h.
References category_metrics_, peak_associations_, stage_metrics_, and total_operations_.
Referenced by kcenon::pacs::network::pipeline::pipeline_coordinator::reset_metrics().

|
private |
Definition at line 401 of file pipeline_metrics.h.
Referenced by decrement_active_associations(), get_active_associations(), and increment_active_associations().
|
staticconstexpr |
Number of job categories.
Definition at line 211 of file pipeline_metrics.h.
|
private |
Definition at line 399 of file pipeline_metrics.h.
Referenced by get_category_metrics(), get_category_metrics(), get_throughput_per_second(), record_operation_completion(), and reset().
|
private |
Definition at line 402 of file pipeline_metrics.h.
Referenced by get_peak_associations(), increment_active_associations(), and reset().
|
staticconstexpr |
|
private |
Definition at line 398 of file pipeline_metrics.h.
Referenced by decrement_stage_queue(), get_stage_metrics(), get_stage_metrics(), increment_stage_queue(), record_stage_completion(), and reset().
|
private |
Definition at line 403 of file pipeline_metrics.h.
Referenced by get_throughput_per_second(), and mark_start_time().
|
private |
Definition at line 400 of file pipeline_metrics.h.
Referenced by get_total_operations(), record_operation_completion(), and reset().