class Testify::Tracker::Tracer(A)

Overview

Creates a tracer that can trace calls, elapsed time, etc with some data.

See LogTracer for an example.

Defined in:

tracer/arg.cr
tracer/trace.cr
tracer/tracer.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

Instance Method Detail

def add(name : String | Symbol, args : Array) #

Creates a trace referenced to the name namespace.


def args?(name : String | Symbol, index : Int32) : Array(Arg(A)) #

Returns Trace arguments added to name at index.


def args_values?(name : String | Symbol, index : Int32) : Array(A) #

Returns the values of Trace arguments added to name at index.


def get(name : String | Symbol, index : Int32) : Trace(A) #

Returns Trace instance of name at index.


def get(name : String | Symbol) : Array(Trace(A)) #

Returns entries of name.


def get?(name : String | Symbol, index : Int32) : Trace(A)? #

Returns Trace instance of name at index.


def get?(name : String | Symbol) : Array(Trace(A))? #

Returns entries of name.


def has?(name : String | Symbol) : Bool #

Returns true if name has one or more traces.


def period : Time::Span #

Period (Time.monotonic) of the tracer creation.


def size(name : String | Symbol) : Int32 #

Returns the numbers of traces for name.


def traces : Hash(String, Array(Trace(A))) #

Returns a Hash of all entries.


def with_args?(name : String | Symbol, index : Int32, args : Array(Arg(A))) : Bool #

Compares args with the Trace arguments added to name at index.


def with_args?(name : String | Symbol, index : Int32, args : Array) : Bool #

Compares args with the Trace arguments added to name at index.