Documentation ¶
Index ¶
- type Histogram
- func (m Histogram) Cancel(x Histogram) Histogram
- func (m Histogram) Combine(x Histogram) Histogram
- func (m Histogram) Insert(val float64, count float64) Histogram
- func (m Histogram) Min(o Histogram) Histogram
- func (m Histogram) Read(val float64) float64
- func (m Histogram) Serialize() []byte
- func (m Histogram) ToRawHist() RawHist
- func (m Histogram) Total() float64
- type RawHist
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Histogram ¶
type Histogram struct { // This will be used as an int, but it's a float to satisfy upstream // dependencies Resolution int // using strings as keys because I've used floats long enough // to not compare them for equality. Registers map[string]float64 }
Histogram is, for now, a map store implementing something akin to the HDRHistogram idea, meaning it's high-accuracy and has few restrictions. It can be an issue for space, as it will get bigger as more keys are added.
func Deserialize ¶
Deserialize is the inverse of serialize.
func FromRawHist ¶
FromRawHist takes an interchange pair and regenerates a hist.
func (Histogram) Cancel ¶
Cancel subtracts the argument from the base. It's called cancel and not diff or subtract because enjoy having negative values in your hists if you're not careful.
Click to show internal directories.
Click to hide internal directories.