stat

package
v1.0.51 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AtomicStat

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

func NewAtomicStat

func NewAtomicStat() *AtomicStat

func (*AtomicStat) AddDuration

func (s *AtomicStat) AddDuration(duration time.Duration)

func (*AtomicStat) AddTime

func (s *AtomicStat) AddTime(start time.Time) time.Time

func (*AtomicStat) GetAverage

func (s *AtomicStat) GetAverage() float64

func (*AtomicStat) GetAverageString

func (s *AtomicStat) GetAverageString() string

func (*AtomicStat) GetCount

func (s *AtomicStat) GetCount() int32

func (*AtomicStat) GetDuration

func (s *AtomicStat) GetDuration() time.Duration

func (*AtomicStat) String

func (s *AtomicStat) String() string

type AtomicStats

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

func NewAtomicStats

func NewAtomicStats() *AtomicStats

func (*AtomicStats) AddDuration

func (s *AtomicStats) AddDuration(key string, duration time.Duration) *AtomicStats

func (*AtomicStats) AddTime

func (s *AtomicStats) AddTime(key string, start time.Time) time.Time

func (*AtomicStats) GetAverageDuration

func (s *AtomicStats) GetAverageDuration() time.Duration

func (*AtomicStats) GetCount

func (s *AtomicStats) GetCount() int32

func (*AtomicStats) GetMap

func (s *AtomicStats) GetMap() map[string]*AtomicStat

func (*AtomicStats) GetTotalDuration added in v1.0.29

func (s *AtomicStats) GetTotalDuration() time.Duration

func (*AtomicStats) GetTotalDurationAndCount added in v1.0.29

func (s *AtomicStats) GetTotalDurationAndCount() (time.Duration, int32)

func (*AtomicStats) String

func (s *AtomicStats) String(indent string) string

Jump to

Keyboard shortcuts

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