Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultOtherMaxSize = 100 DefaultSCounterQpsPeriod = 1 DefaultSMathBasePeriod = 1 )
View Source
const ( MinPositiveFloat64 = 0.000001 MaxNegativeFloat64 = -0.000001 )
internal
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataFilter ¶
type DataFilter struct {
sync.RWMutex
MaxSize int
Name string
PK string
Opt string
Threshold float64
L *list.List
}
func NewDataFilter ¶
func NewDataFilter(name string, maxSize int) *DataFilter
func (*DataFilter) Filter ¶
func (this *DataFilter) Filter(pk string, val float64, v interface{})
proposed that there were few traced items
func (*DataFilter) GetAllFiltered ¶
func (this *DataFilter) GetAllFiltered() []interface{}
type DataTrace ¶
func NewDataTrace ¶
func (*DataTrace) GetAllTraced ¶
func (this *DataTrace) GetAllTraced() []interface{}
type SCounterBase ¶
type SCounterBase struct {
sync.RWMutex
Name string
Cnt int64
Time string
Other map[string]interface{}
// contains filtered or unexported fields
}
basic counter
func NewSCounterBase ¶
func NewSCounterBase(name string) *SCounterBase
func (*SCounterBase) Get ¶
func (this *SCounterBase) Get() *SCounterBase
func (*SCounterBase) Incr ¶
func (this *SCounterBase) Incr()
func (*SCounterBase) IncrBy ¶
func (this *SCounterBase) IncrBy(incr int64)
func (*SCounterBase) PutOther ¶
func (this *SCounterBase) PutOther(key string, value interface{}) bool
func (*SCounterBase) SetCnt ¶
func (this *SCounterBase) SetCnt(cnt int64)
type SCounterQps ¶
type SCounterQps struct {
sync.RWMutex
Name string
Cnt int64
Qps int64
Time string
Other map[string]interface{}
// contains filtered or unexported fields
}
counter with qps
func NewSCounterQps ¶
func NewSCounterQps(name string) *SCounterQps
func (*SCounterQps) Get ¶
func (this *SCounterQps) Get() *SCounterQps
func (*SCounterQps) Incr ¶
func (this *SCounterQps) Incr()
func (*SCounterQps) IncrBy ¶
func (this *SCounterQps) IncrBy(incr int64)
func (*SCounterQps) PutOther ¶
func (this *SCounterQps) PutOther(key string, value interface{}) bool
Click to show internal directories.
Click to hide internal directories.