Documentation ¶
Overview ¶
Package timing contains utility functions to measure execution times. It identifies measure by names to be able to start and stop the measurements from completely different parts of the code without having to share a variable.
This package can be configured to use any object that implements the Output interface from the output package to write it's results.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartMeasure ¶
func StartMeasure(name string)
StartMeasure starts a time measure identified by a name.
func StopMeasure ¶
StopMeasure stops a time measure identified by a name, prints the result to the current output interface and returns the measured time. Returns 0 if no measure was started with that name.
func StopMeasureAndLog ¶
func StopMeasureAndLog(name string)
StopMeasureAndLog prints the value to Lvl1 instead of returning it
func StopMeasureAndLogWithInfo ¶
func StopMeasureAndLogWithInfo(name, info string)
StopMeasureAndLog prints the value to Lvl1 instead of returning it (logs "info" too)
Types ¶
This section is empty.