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

View Source

Analyzes performance patterns across timeline events.

Detects:

  • Slow events using adaptive thresholds (> mean + 2std_dev)
  • Bottlenecks (events taking >50% of total time)
  • Very slow events (>1000ms)

Uses data from the Duration enricher (event_duration_ms) to identify performance issues.

Algorithm

  1. Calculate baseline stats (mean, std deviation)
  2. Detect slow events:
    • Warning: Duration > mean + 2std_dev
    • Critical: Duration > 1000ms OR > mean + 3std_dev
  3. Detect bottlenecks: Events taking >50% of total time

Output

Returns findings and statistics:

%{
  findings: [
    %{
      severity: :warning,
      message: "Slow event (250ms, 5x average)",
      events: [3],
      metadata: %{duration_ms: 250, multiplier: 5.0}
    }
  ],
  stats: %{
    min_duration: 10,
    max_duration: 250,
    avg_duration: 50,
    total_duration: 500
  }
}

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.