Debugging helpers powered by :recon (Erlang runtime inspection).
This module is only available in :dev and :test environments.
It provides convenient Elixir wrappers around common :recon operations
for inspecting the TestcontainerEx GenServer, processes, and memory.
Prerequisites
Add :recon to your dependencies (already included in dev/test):
{:recon, "~> 2.5", only: [:dev, :test]}Usage (from iex -S mix)
# Show top processes by memory
TestcontainerEx.Recon.top_processes()
# Inspect the TestcontainerEx GenServer state
TestcontainerEx.Recon.server_state()
# Show process info for the GenServer
TestcontainerEx.Recon.server_info()
Summary
Functions
Returns memory allocation breakdown for the node.
Returns a summary of the TestcontainerEx server's tracked resources.
Returns process info for the TestcontainerEx GenServer.
Returns the current state of the TestcontainerEx GenServer.
Returns the top N processes sorted by memory usage.
Functions
@spec memory() :: [{atom(), non_neg_integer()}]
Returns memory allocation breakdown for the node.
@spec resource_summary() :: map() | {:error, :not_running}
Returns a summary of the TestcontainerEx server's tracked resources.
More readable than server_state/0 — shows counts and names rather
than the full state struct.
Returns process info for the TestcontainerEx GenServer.
@spec server_state() :: map() | {:error, :not_running}
Returns the current state of the TestcontainerEx GenServer.
Useful for debugging from IEx to see tracked containers, networks, and compose environments.
@spec top_processes(pos_integer()) :: [{pid(), term()}]
Returns the top N processes sorted by memory usage.
Uses :recon.proc_windows/2 when available, falls back to a simple
implementation otherwise.