class Azu::DevelopmentTools::Profiler

Overview

Built-in profiler for Crystal applications

Defined in:

azu/development_tools.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(enabled : Bool = false) #

[View source]

Instance Method Detail

def clear #

Clear all profile data


[View source]
def enabled : Bool #

[View source]
def enabled=(enabled : Bool) #

Enable/disable profiling


[View source]
def entries : Array(ProfileEntry) #

Get all profile entries


[View source]
def profile(name : String, capture_stack : Bool = false, & : -> T) : T forall T #

Profile a block of code


[View source]
def report : String #

Generate profile report


[View source]
def stats : Hash(String, Hash(String, Float64)) #

Get aggregated profile statistics


[View source]