class

Logarithm::PerformanceMonitor

Inherits Reference < Object

Performance monitoring and alerting system

This module provides:

  • Real-time performance monitoring
  • Performance threshold alerting
  • Performance trend analysis
  • Resource usage tracking
  • Performance bottleneck detection

Constructors

new(max_alert_history : Int32 = 1000, monitoring_enabled : Bool = true)
Source

Instance methods

add_threshold(threshold : PerformanceThreshold)
Source
alerts
Source
alerts_summary
Source
clear_old_alerts(hours : Int32 = 24)
Source
current_metrics
Source
get_metric_history(metric : MetricType, hours : Int32 = 24) : Array(Tuple(Float64, Time))
Source
get_recent_alerts(limit : Int32 = 50) : Array(PerformanceAlert)
Source
max_alert_history
Source
monitoring_enabled?
Source
performance_summary
Source
record_metric(metric : MetricType, value : Float64, timestamp : Time = Time.utc)
Source
remove_threshold(metric : MetricType)
Source
setup_default_thresholds
Source
thresholds
Source

Nested types