Skip to content

Add erlang process information (with simple chart) #789

@kraleppa

Description

@kraleppa

Expose key Erlang process metrics for the LiveView process and visualize them in a lightweight, non-persistent chart in the Performance tab.

This task is result of #464
Consider using this library for chart https://github.com/Stax3/live_charts

Scope

  • Collect per-LiveView process metrics:
    • reductions
    • memory
    • total_heap_size
    • heap_size
    • stack_size
    • gc_min_heap_size
    • gc_fullsweep_after
  • Sample metrics at a small, fixed interval while the Performance tab is open (stop when closed).
  • Render a simple in-browser chart (single series at a time with a dropdown to pick metric).
  • Reset data on tab refresh; no persistence.

Technical Notes

  • Use the PoC module from PR PoC: performance debugging techniques #786 as a base for gathering process data.
  • Follow the “non-persistent charts” guidance; keep CPU/alloc overhead minimal.
  • Ensure the target process is the LiveView’s owning process (not the transport process).

Acceptance Criteria

  • Opening a LiveView’s Performance tab shows current metric values and a live-updating chart for the selected metric.
  • Closing the tab halts sampling; reopening starts a fresh, empty series.
  • Verified values match :erlang.process_info/2 (spot-checked) and update smoothly under load.
  • No noticeable slowdown of the LiveView while the chart runs.

Out of Scope

  • Persisting history, exporting data, multi-process comparisons.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions