Documentation ¶
Overview ¶
Package monitor implements an instrumentation interface.
Arbitrary functions can be profiled, and profile results are passed to the logger function (Monitor.Logger).
Index ¶
- func Duration(f func()) time.Duration
- type Monitor
- func (m *Monitor) Log(section string)
- func (m *Monitor) MonitorFunc(section string, myfunc interface{}) []reflect.Value
- func (m *Monitor) MonitorFuncWithArgs(section string, myfunc interface{}, args []reflect.Value) []reflect.Value
- func (m *Monitor) MonitorReflectedFunc(section string, reflectedFunc reflect.Value, args []reflect.Value) []reflect.Value
- func (m *Monitor) StopAndLog(sectionName string) error
- type Section
- type Stopwatch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Monitor ¶
func NewMonitor ¶
func NewMonitor() *Monitor
func (*Monitor) MonitorFunc ¶
Function decorator to monitor the execution of an anonymous function returns an array of the returned Values
func (*Monitor) MonitorFuncWithArgs ¶
func (*Monitor) MonitorReflectedFunc ¶
func (m *Monitor) MonitorReflectedFunc(section string, reflectedFunc reflect.Value, args []reflect.Value) []reflect.Value
Function decorator to monitor a reflected function
func (*Monitor) StopAndLog ¶
stop the stopwatch
Click to show internal directories.
Click to hide internal directories.