struct Lapis::Profiler::AllocationSnapshot

Overview

Stack-allocated point-in-time snapshot of GC memory statistics. Captures Boehm GC counters without triggering any heap allocations.

Defined in:

libgodot/profiler/core/snapshot.cr

Constructors

Instance Method Summary

Instance methods inherited from class Object

try?(&)
try?
try?

Constructor Detail

def self.capture : AllocationSnapshot #

Captures current GC state with zero heap allocations.


def self.new(total_bytes : UInt64, bytes_since_gc : UInt64, heap_size : UInt64, free_bytes : UInt64, unmapped_bytes : UInt64, timestamp : ::Time::Instant = ::Time.instant) #

Instance Method Detail

def bytes_since_gc : UInt64 #

def delta_from(prior : AllocationSnapshot) : AllocationDelta #

Computes delta between this snapshot (after) and a prior snapshot (before).


def free_bytes : UInt64 #

def heap_size : UInt64 #

def timestamp : ::Time::Instant #

def total_bytes : UInt64 #

def unmapped_bytes : UInt64 #