Documentation ¶
Overview ¶
Package counter define single or multi metric counters
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeValue ¶
func NormalizeValue(values []interface{}) []interface{}
NormalizeValue normalize stat values
Types ¶
type Counter ¶
type Counter struct { Count int64 `json:",omitempty"` Custom CustomCounter }
Counter represents a counter
func (*Counter) IncrementBy ¶
IncrementBy increments counter
type CustomCounter ¶
type CustomCounter interface {
Aggregate(value interface{})
}
type CustomProvider ¶
type CustomProvider interface {
NewCounter() CustomCounter
}
type MultiCounter ¶
MultiCounter represents multi value counter
func (*MultiCounter) DecrementValue ¶
func (c *MultiCounter) DecrementValue(value interface{}) int64
DecrementValue decrements counter by 1
func (*MultiCounter) IncrementValue ¶
func (c *MultiCounter) IncrementValue(value interface{}) int64
IncrementValue increments counter
func (*MultiCounter) IncrementValueBy ¶
func (c *MultiCounter) IncrementValueBy(value interface{}, i int64) int64
IncrementValueBy increments counter
type Operation ¶
type Operation struct { *MultiCounter TimeTaken int64 Max int64 Min int64 Avg int32 // contains filtered or unexported fields }
Operation represents basic metrics
func NewOperation ¶
NewOperation creates operation metrics
Source Files ¶
Click to show internal directories.
Click to hide internal directories.