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

View Source

Analyzes event patterns and sequences across timeline.

Detects:

  • Duplicate consecutive events (unnecessary re-renders)
  • Excessive event counts (>10 of same event)
  • Common event sequences (repeated patterns)
  • Optimization opportunities (debouncing, throttling)

Algorithm

  1. Track event frequencies
  2. Detect consecutive duplicates (3+ same events in a row)
  3. Detect excessive events (>10 total of same type)
  4. Identify common sequences (2+ event patterns)
  5. Suggest optimizations based on patterns

Output

Returns findings and statistics:

%{
  findings: [
    %{
      severity: :warning,
      message: "3 consecutive 'handle_event:filter' events - may indicate unnecessary re-renders",
      events: [2, 3, 4],
      metadata: %{event_type: "handle_event:filter", count: 3}
    }
  ],
  stats: %{
    event_counts: %{"mount" => 1, "handle_event:filter" => 5},
    most_common_event: "handle_event:filter",
    common_sequences: [["mount", "handle_event:filter", "handle_event:sort"]]
  }
}

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.