Excessibility.TelemetryCapture.Analyzers.MessageFlooding (Excessibility v0.14.0)

View Source

Detects high-frequency handle_info message patterns.

LiveViews subscribing to PubSub or using timers can receive messages faster than useful, causing unnecessary processing and renders.

Detection

  • Sliding window: >10 same-name handle_info events within 200ms
  • Total count: >20 of any single handle_info type
  • Suggests debouncing, throttling, or increasing timer intervals

Output

%{
  findings: [%{
    severity: :warning,
    message: "47 handle_info(:tick) events in 200ms...",
    events: [1, 2, ..., 47],
    metadata: %{event_type: "handle_info:tick", count: 47, window_ms: 200}
  }],
  stats: %{handle_info_counts: %{"handle_info:tick" => 47}}
}

Summary

Functions

analyze(map, opts)

Callback implementation for Excessibility.TelemetryCapture.Analyzer.analyze/2.

default_enabled?()

Callback implementation for Excessibility.TelemetryCapture.Analyzer.default_enabled?/0.

name()

Callback implementation for Excessibility.TelemetryCapture.Analyzer.name/0.

requires_enrichers()

Callback implementation for Excessibility.TelemetryCapture.Analyzer.requires_enrichers/0.