stats

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2017 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Measure

func Measure(names ...string) func()

Measure an operation. Easiest used as `defer Measure("name")()`.

func Record

func Record(op Operation)

Record an operation execution

func RecordError

func RecordError(name string)

Record an operation failing

func Run

func Run() func()

Run the synchronous measurement routine.

Types

type Operation

type Operation struct {
	Name    string
	Elapsed time.Duration
	Error   bool
}

Operation holds the details of a measured operation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL