exectime

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintStats

func PrintStats()

func SetDefault

func SetDefault(out io.Writer, debug bool)

func Start

func Start(key string)

func StatTimeCurrentBlock

func StatTimeCurrentBlock(name string) func()

func Stop

func Stop(key string)

func SwitchOffDebug

func SwitchOffDebug()

func SwitchOnDebug

func SwitchOnDebug()

func TimeCurrentBlock

func TimeCurrentBlock(name string) func()

Types

type RunningStatistics

type RunningStatistics struct {
	N uint64
	// contains filtered or unexported fields
}

func NewRunningStatistics

func NewRunningStatistics() *RunningStatistics

func (*RunningStatistics) Mean

func (rs *RunningStatistics) Mean() time.Duration

func (*RunningStatistics) Push

func (rs *RunningStatistics) Push(dur time.Duration)

func (*RunningStatistics) StandardDeviation

func (rs *RunningStatistics) StandardDeviation() time.Duration

func (*RunningStatistics) Variance

func (rs *RunningStatistics) Variance() time.Duration

type Timer

type Timer struct {
	// contains filtered or unexported fields
}

func New

func New(out io.Writer, debug bool) *Timer

func (*Timer) PrintStats

func (t *Timer) PrintStats()

func (*Timer) Start

func (t *Timer) Start(key string)

func (*Timer) StatTimeCurrentBlock

func (t *Timer) StatTimeCurrentBlock(key string) func()

func (*Timer) Stop

func (t *Timer) Stop(key string)

func (*Timer) SwitchOffDebug

func (t *Timer) SwitchOffDebug()

func (*Timer) SwitchOnDebug

func (t *Timer) SwitchOnDebug()

func (*Timer) TimeCurrentBlock

func (t *Timer) TimeCurrentBlock(name string) func()

Jump to

Keyboard shortcuts

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