Documentation ¶
Index ¶
- Variables
- func InitAverager(averagerp *Averager, size int)
- func NewRunner() (run *runner)
- type Averager
- type Counter
- func (cn *Counter) Add(delta int64) (counter parl.Counter)
- func (cn *Counter) Clone() (counterValues parl.CounterValues)
- func (cn *Counter) CloneReset(stopRateCounters bool) (counterValues parl.CounterValues)
- func (cn *Counter) Dec() (counter parl.Counter)
- func (cn *Counter) Get() (value uint64, running uint64, max uint64)
- func (cn *Counter) Inc() (counter parl.Counter)
- func (cn *Counter) Max() (max uint64)
- func (cn *Counter) Running() (running uint64)
- func (cn *Counter) Value() (value uint64)
- type Counters
- func (cs *Counters) GetCounters() (list []parl.CounterID, m map[parl.CounterID]any)
- func (cs *Counters) GetOrCreateCounter(name parl.CounterID, period ...time.Duration) (counter parl.Counter)
- func (cs *Counters) GetOrCreateDatapoint(name parl.CounterID, period time.Duration) (datapoint parl.Datapoint)
- func (cs *Counters) ResetCounters(stopRateCounters bool)
- type Datapoint
- func (dt *Datapoint) CloneDatapoint() (datapoint parl.Datapoint)
- func (dt *Datapoint) CloneDatapointReset() (datapoint parl.Datapoint)
- func (dt *Datapoint) DatapointMax() (max uint64)
- func (dt *Datapoint) DatapointMin() (min uint64)
- func (dt *Datapoint) DatapointValue() (value uint64)
- func (dt *Datapoint) GetDatapoint() (value, max, min uint64, isValid bool, average float64, n uint64)
- func (dt *Datapoint) SetValue(value uint64) (datapoint parl.Datapoint)
- type Rate
- type RateCounter
- type RateRunner
- type RateRunnerTask
- type RateType
Constants ¶
This section is empty.
Variables ¶
View Source
var CountersFactory parl.CountersFactory = &countersFactory{}
Functions ¶
func InitAverager ¶
Types ¶
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
Counter is a counter without rate information. Counter implements parl.Couter and parl.CounterValues. Counter is thread-safe
func (*Counter) Clone ¶
func (cn *Counter) Clone() (counterValues parl.CounterValues)
func (*Counter) CloneReset ¶
func (cn *Counter) CloneReset(stopRateCounters bool) (counterValues parl.CounterValues)
type Counters ¶
type Counters struct { RateRunner // contains filtered or unexported fields }
func (*Counters) GetCounters ¶
func (*Counters) GetOrCreateCounter ¶
func (*Counters) GetOrCreateDatapoint ¶
func (*Counters) ResetCounters ¶
type Datapoint ¶
type Datapoint struct {
// contains filtered or unexported fields
}
Datapoint is TODO 221210 Datapoint is thread-safe
func (*Datapoint) CloneDatapoint ¶
func (*Datapoint) CloneDatapointReset ¶
func (*Datapoint) DatapointMax ¶
func (*Datapoint) DatapointMin ¶
func (*Datapoint) DatapointValue ¶
func (*Datapoint) GetDatapoint ¶
type RateCounter ¶
type RateCounter struct { Counter // contains filtered or unexported fields }
func (*RateCounter) Do ¶
func (rc *RateCounter) Do()
type RateRunner ¶
type RateRunner struct {
// contains filtered or unexported fields
}
func NewRateRunner ¶
func NewRateRunner(g0 parl.GoGen) (rr *RateRunner)
func (*RateRunner) AddTask ¶
func (rr *RateRunner) AddTask(period time.Duration, task RateRunnerTask)
type RateRunnerTask ¶
type RateRunnerTask interface {
Do()
}
Click to show internal directories.
Click to hide internal directories.