stat

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const MaxStatFileCount = 10
View Source
const MaxStatFileSize = 100 * 1024 * 1024

Variables

This section is empty.

Functions

func DeferAppStat

func DeferAppStat(appid uint32, b time.Time, err **dogErr.CodeError)

func DeferStat

func DeferStat(b time.Time, err **dogErr.CodeError)

Types

type Stat

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

func NewStat

func NewStat() *Stat

func (*Stat) Begin

func (st *Stat) Begin(cmd string) *Stat

func (*Stat) BeginAt

func (st *Stat) BeginAt(cmd string, begin time.Time) *Stat

BeginAt begin is micro seconds

func (*Stat) BeginFuncCmd

func (st *Stat) BeginFuncCmd() *Stat

BeginFuncCmd use funcName as cmd

func (*Stat) BeginFuncCmdAt

func (st *Stat) BeginFuncCmdAt(begin time.Time) *Stat

BeginFuncCmdAt use funcName as cmd but set begin

func (*Stat) Elapse

func (st *Stat) Elapse() time.Duration

Elapse return Duration

func (*Stat) End

func (st *Stat) End(ret int)

func (*Stat) EndErr

func (st *Stat) EndErr(err error)

type StatMgr

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

func StatMgrInstance

func StatMgrInstance() *StatMgr

func (*StatMgr) Init

func (mgr *StatMgr) Init(statPath string, statGap time.Duration)

type StatValue

type StatValue struct {
	Total  int
	SumVal int
	Avg    int64
	Max    int64
	Min    int64
	Gt10   int
	Gt100  int
	Gt500  int
	TotalD int64
}

Jump to

Keyboard shortcuts

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