module Lapis::Profiler::AllocationProbe

Extended Modules

Defined in:

libgodot/profiler/core/probe.cr

Instance Method Summary

Instance Method Detail

def run(name : String = "Hot Loop", iterations : Int32 = 1000, warmup : Int32 = 10, threshold_bytes : Int64 = 0_i64, &) : AllocationReport #

Executes the given block across warm-up and measurement iterations, capturing total heap bytes allocated with zero probe measurement overhead.

Parameters:

  • name: Label for the benchmark or hot loop.
  • iterations: Number of hot loop iterations to execute during the measured window.
  • warmup: Number of pre-run iterations to execute before taking the initial snapshot.
  • threshold_bytes: Maximum allowed byte ceiling (0 for strict zero-allocation).

The block can optionally accept the current iteration index (idx : Int32).