Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stats ¶
type Stats interface {
// Add adds the value to the given stat line
Add(stat Stat, delta float64)
// Set sets the value for the given stat line
Set(stat Stat, value float64)
// Get gets the value of the given stat line
Get(stat Stat) (value float64)
}
Stats provides some additional statistics for each node
type TrackedFloat ¶
type TrackedFloat[T int | int32 | int64 | float32 | float64] struct { // contains filtered or unexported fields }
func (*TrackedFloat[T]) Add ¶
func (t *TrackedFloat[T]) Add(val T)
func (*TrackedFloat[T]) Avg ¶
func (t *TrackedFloat[T]) Avg() float64
func (*TrackedFloat[T]) Decr ¶
func (t *TrackedFloat[T]) Decr()
func (*TrackedFloat[T]) Incr ¶
func (t *TrackedFloat[T]) Incr() func()
func (*TrackedFloat[T]) Max ¶
func (t *TrackedFloat[T]) Max() T
func (*TrackedFloat[T]) Min ¶
func (t *TrackedFloat[T]) Min() T
func (*TrackedFloat[T]) OnMaxSet ¶
func (t *TrackedFloat[T]) OnMaxSet(f func(T))
func (*TrackedFloat[T]) Val ¶
func (t *TrackedFloat[T]) Val() T
Click to show internal directories.
Click to hide internal directories.