class

CogUtil::PerformanceMonitor

Inherits Reference < Object

Constructors

new(sample_buffer_size : Int32 = 10000)
Source

Instance methods

acknowledge_alert(rule_name : String)

Acknowledge an alert

Source
add_alert_rule(rule : AlertRule)

Add custom alert rule

Source
export_monitoring_data(format : String = "json") : String

Export monitoring data

Source
generate_monitoring_report

Generate performance monitoring report

Source
get_active_alerts

Get active alerts

Source
get_metric_history(name : String, duration : Time::Span = 1.hour) : Array(MetricSample)

Get recent metrics for a specific name

Source
get_performance_summary

Get current performance summary

Source
record_metric(name : String, value : Float64, tags : Hash(String, String) = Hash(String, String).new)

Record a performance metric

Source
start_dashboard(port : Int32 = 8080)

Start HTTP dashboard server

Source
start_monitoring(interval : Time::Span = 1.second)

Start real-time monitoring

Source
stop_dashboard

Stop dashboard server

Source
stop_monitoring

Stop monitoring

Source

Nested types