Documentation
¶
Overview ¶
Reports averages and histograms. These metrics will show up at /debug/metrics as timer_* histograms There is a separate /debug/timers page for an overview of these metrics only.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Console ¶
func Console(name string) func()
Useful for debugging, prints running times to the console. When called with defer use (note the trailing "()"): defer timer.Console("name")()
func DebugConsole ¶
func DebugConsole(name string) func()
func MilliCounter ¶
func MilliCounter() milliCounter
Types ¶
type Timer ¶
type Timer struct {
// contains filtered or unexported fields
}
Use NewTimer for construction
func (*Timer) Batch ¶
Usage, note the final (): defer t.Batch(10)()
Note: this adds just one value for the full batch. Implications:
- the count at the summary page has to be multiplied with the average batch size to get the true count.
- If batch sizes are different than this overrepresent small batches.
Click to show internal directories.
Click to hide internal directories.