Azu::PerformanceMetrics
Performance metrics collection and analysis system Tracks request processing times, memory usage, component lifecycle, and error rates
Constructors
Class methods
Instance methods
Get cache operation breakdown by operation type
Get cache statistics
component_stats(component_type : String | Nil = nil, since : Time | Nil = nil) : Hash(String, Float64)
Get component statistics
enabled
SourceGet endpoint-specific statistics
record_cache(key : String, operation : String, store_type : String, processing_time : Float64, hit : Bool | Nil = nil, key_size : Int32 = 0, value_size : Int32 | Nil = nil, ttl : Time::Span | Nil = nil, error : String | Nil = nil)
Record a cache operation metric
record_component(component_id : String, component_type : String, event : String, processing_time : Float64 | Nil = nil, memory_before : Int64 | Nil = nil, memory_after : Int64 | Nil = nil, age_at_event : Time::Span | Nil = nil)
Record a component lifecycle metric
record_request(endpoint : String, method : String, path : String, processing_time : Float64, memory_before : Int64, memory_after : Int64, status_code : Int32, request_id : String | Nil = nil)
Record a request metric
start_time
Source