stats

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DistribRange

func DistribRange(low, high, factor float64) []float64

Returns a range of upper bounds, starting at low and ending at high (exactly), with factor increments, i.e. the result R has R[i] * factor = R[i+1], except for the last element, which is guaranteed to be high.

Types

type Counter

type Counter struct {
	// contains filtered or unexported fields
}

func NewCounter

func NewCounter(name string) *Counter

func (*Counter) Increment

func (c *Counter) Increment()

func (*Counter) Name

func (c *Counter) Name() string

func (*Counter) Value

func (c *Counter) Value() int64

type Distribution

type Distribution struct {
	// contains filtered or unexported fields
}

func NewDistribution

func NewDistribution(name string, upperBounds []float64) (*Distribution, error)

func (*Distribution) Add

func (d *Distribution) Add(value float64)

func (*Distribution) Copy

func (d *Distribution) Copy() *Distribution

For now, instead of providing synchronized access to all individual fields, just let clients copy the whole Distribution if they want to read it.

Jump to

Keyboard shortcuts

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