class Lapis::Profiler::AuditBuilder

Overview

Declarative Builder DSL for configuring allocation audits and profiling runs

Defined in:

libgodot/profiler/dsl/builder.cr

Constructors

Instance Method Summary

Instance methods inherited from class Object

try?(&)
try?
try?

Constructor Detail

def self.new(name : String = "Hot Loop") #

Instance Method Detail

def assert_max_allocations(max : Int64 | Int32 = @max_bytes, file : String = __FILE__, line : Int32 = __LINE__, &) : AllocationReport #

Executes the loop and raises AllocationViolationError if allocations exceed max_bytes


def assert_zero_allocation(file : String = __FILE__, line : Int32 = __LINE__, &) : AllocationReport #

Executes the loop and raises AllocationViolationError if any bytes were allocated


def iterations(val : Int32) : self #

Sets the number of measured hot loop iterations


def iterations : Int32 #

def iterations=(iterations : Int32) #

def max_bytes(val : Int64 | Int32) : self #

Sets the maximum permitted bytes allocated before failing


def max_bytes : Int64 #

def max_bytes=(max_bytes : Int64) #

def name(val : String) : self #

Sets the audit label or operation name


def name : String #

def name=(name : String) #

def profile(&) : AllocationReport #

Runs the hot loop profiling probe and returns the resulting report


def warmup(val : Int32) : self #

Sets the number of warm-up iterations


def warmup_cycles : Int32 #

def warmup_cycles=(warmup_cycles : Int32) #