CovenantSQL: github.com/CovenantSQL/CovenantSQL/utils/timer Index | Files

package timer

import "github.com/CovenantSQL/CovenantSQL/utils/timer"

Index

Package Files

timer.go

type Timer Uses

type Timer struct {
    sync.Mutex
    // contains filtered or unexported fields
}

Timer defines a stop watch timer for performance analysis.

func NewTimer Uses

func NewTimer() *Timer

NewTimer returns a new stop watch timer instance.

func (*Timer) Add Uses

func (t *Timer) Add(name string)

Add records a time pivot.

func (*Timer) ToLogFields Uses

func (t *Timer) ToLogFields() log.Fields

ToLogFields returns analysis results as log fields.

func (*Timer) ToMap Uses

func (t *Timer) ToMap() map[string]time.Duration

ToMap returns analysis results as time duration map.

Package timer imports 3 packages (graph) and is imported by 2 packages. Updated 2019-01-30. Refresh now. Tools for package owners.