BeamConsole.Diff (beam_console v0.2.0)

Copy Markdown View Source

Describes bounded differences between two sampled runtime snapshots.

Lifecycle fields use observed_ terminology because short-lived changes can occur between samples and are not guaranteed to be lossless.

Summary

Functions

Computes a bounded difference from one snapshot to the next.

Types

entity_id()

@type entity_id() :: String.t()

field()

@type field() ::
  :observed_started | :observed_stopped | :changed | :edge_added | :edge_removed

omission_counts()

@type omission_counts() :: %{optional(field()) => non_neg_integer()}

t()

@type t() :: %BeamConsole.Diff{
  changed: [entity_id()],
  edge_added: [entity_id()],
  edge_removed: [entity_id()],
  from_sequence: non_neg_integer(),
  observed_started: [entity_id()],
  observed_stopped: [entity_id()],
  omitted: non_neg_integer(),
  omitted_by: omission_counts(),
  to_sequence: non_neg_integer()
}

Functions

between(previous, current, limit \\ 500)

@spec between(
  BeamConsole.Snapshot.t() | nil,
  BeamConsole.Snapshot.t(),
  non_neg_integer()
) :: t()

Computes a bounded difference from one snapshot to the next.

Passing nil as the previous snapshot reports current processes as observed starts. Once the event limit is reached, remaining records are counted in omitted; omitted_by preserves the affected change categories.