proc

package
v0.0.0-...-ff3f51f Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2015 License: Apache-2.0 Imports: 6 Imported by: 6

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{}

func (*DataFilter) SetFilter

func (this *DataFilter) SetFilter(pk string, opt string, threshhold float64) error

type DataTrace

type DataTrace struct {
	sync.RWMutex
	MaxSize int
	Name    string
	PK      string
	L       *list.List
}

func NewDataTrace

func NewDataTrace(name string, maxSize int) *DataTrace

func (*DataTrace) GetAllTraced

func (this *DataTrace) GetAllTraced() []interface{}

func (*DataTrace) SetPK

func (this *DataTrace) SetPK(pk string)

func (*DataTrace) Trace

func (this *DataTrace) Trace(pk string, v interface{})

proposed that there were few traced items

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

Jump to

Keyboard shortcuts

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