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

View Source

Detects large assigns that get re-diffed frequently.

When a large assign (>5KB) appears in the changes map for >50% of events, it's being sent over the wire repeatedly — a common LiveView performance foot-gun.

Thresholds

  • Warning: assign >5KB, diffed in >50% of events
  • Critical: assign >20KB, diffed in >50% of events

Output

%{
  findings: [
    %{
      severity: :warning,
      message: "`current_user` is 12 KB and was re-diffed in 5/7 events",
      events: [2, 3, 4, 6, 7],
      metadata: %{assign_name: :current_user, size_bytes: 12400, diff_count: 5, total_events: 7}
    }
  ],
  stats: %{assign_diff_ratios: %{current_user: 0.71, filter: 0.14}}
}

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.