debug

A number of methods to simplify measuring time that it takes to run certain routines as well as counting the number of times certain instructions run.

Source:

Methods

(static) fullResetTimer(label)

Source:

Remove all data associated with the timer.

Parameters:
Name Type Description
label string

(static) getAverageTimerTime(label)

Source:

Log the average time one run of the specified timer takes. All runs of the timer are taken into account unless a full reset has been performed.

Parameters:
Name Type Description
label string

(static) getTimerTotal(label) → {number}

Source:

Get the total time for a timer.

Parameters:
Name Type Description
label string
Returns:
Type
number

(static) incrementCounter(label)

Source:

Increment the specified counter.

Parameters:
Name Type Description
label string

(static) init()

Source:

Init/reset all properties of the debug object.

(static) initCounters()

Source:

Init counters object to have incrementation work with any of its properties without the need to assign 0 to it first.

(static) logAndResetEverything(sort)

Source:

Log and reset all timers, as well as counters and other collected values.

Parameters:
Name Type Description
sort boolean

Whether to sort timers and counters alphabetically.

(static) logAndResetTimer(label)

Source:

Log and reset the specified timer.

Parameters:
Name Type Description
label string

(static) resetTimer(label)

Source:

Reset the total time value for the timer.

Parameters:
Name Type Description
label string

(static) startTimer(label)

Source:

Start the specified timer.

Parameters:
Name Type Description
label string

(static) stopTimer(label)

Source:

Stop the specified timer.

Parameters:
Name Type Description
label string