Instruments. Probes. Allocators
(Instruments v2.12.0)
Copy Markdown
A probe that reports per-allocator memory statistics.
This probe reports three metrics, all derived from :recon_alloc:
by_allocator: the memory allocated by each allocator, as reported by:recon_alloc.memory(:allocated_types). A single metric is emitted per allocator, tagged withallocator:<name>.backing_carriers,backing_carriers_size: the number of carriers (and their total size) allocated by each backing allocator, summed across every allocator instance reported by:recon_alloc.allocators/0. One metric is emitted per backing allocator, tagged withallocator:<name>(one ofmseg_allocorsys_alloc).
To use this probe, register it with the matching keys:
alias Instruments.{Probe, Probes}
Probe.define!("recon.alloc.allocated", :gauge,
module: Probes.Allocators,
keys: ~w(
by_allocator
backing_carriers
backing_carriers_size
)a
)All three keys are then reported under recon.alloc.allocated.<key>.