circonusllhist: Index | Files

package circonusllhist

import ""

Package circllhist provides an implementation of Circonus' fixed log-linear histogram data structure. This allows tracking of histograms in a composable way such that accurate error can be reasoned about.


Package Files



const (
    BVL1, BVL1MASK uint64 = iota, 0xff << (8 * iota)

type Histogram Uses

type Histogram struct {
    // contains filtered or unexported fields

This histogram structure tracks values are two decimal digits of precision with a bounded error that remains bounded upon composition

func Deserialize Uses

func Deserialize(in io.Reader) (h *Histogram, err error)

func New Uses

func New() *Histogram

New returns a new Histogram

func NewFromStrings Uses

func NewFromStrings(strs []string, locks bool) (*Histogram, error)

NewFromStrings returns a Histogram created from DecStrings strings

func NewNoLocks Uses

func NewNoLocks() *Histogram

New returns a Histogram without locking

func (*Histogram) ApproxMean Uses

func (h *Histogram) ApproxMean() float64

Approximate mean

func (*Histogram) ApproxQuantile Uses

func (h *Histogram) ApproxQuantile(q_in []float64) ([]float64, error)

func (*Histogram) ApproxSum Uses

func (h *Histogram) ApproxSum() float64

Approximate sum

func (*Histogram) Copy Uses

func (h *Histogram) Copy() *Histogram

Copy creates and returns an exact copy of a histogram.

func (*Histogram) CopyAndReset Uses

func (h *Histogram) CopyAndReset() *Histogram

CopyAndReset creates and returns an exact copy of a histogram, and resets it to default empty values.

func (*Histogram) DecStrings Uses

func (h *Histogram) DecStrings() []string

func (*Histogram) Equals Uses

func (h *Histogram) Equals(other *Histogram) bool

Equals returns true if the two Histograms are equivalent, false if not.

func (*Histogram) FullReset Uses

func (h *Histogram) FullReset()

FullReset resets a histogram to default empty values.

func (*Histogram) MarshalJSON Uses

func (h *Histogram) MarshalJSON() ([]byte, error)

func (*Histogram) Max Uses

func (h *Histogram) Max() float64

Max returns the approximate maximum recorded value.

func (*Histogram) Mean Uses

func (h *Histogram) Mean() float64

Mean returns the approximate arithmetic mean of the recorded values.

func (*Histogram) Merge Uses

func (h *Histogram) Merge(o *Histogram)

Merge merges all bins from another histogram.

func (*Histogram) Min Uses

func (h *Histogram) Min() float64

Min returns the approximate minimum recorded value.

func (*Histogram) RecordCorrectedValue Uses

func (h *Histogram) RecordCorrectedValue(v, expectedInterval int64) error

RecordCorrectedValue records the given value, correcting for stalls in the recording process. This only works for processes which are recording values at an expected interval (e.g., doing jitter analysis). Processes which are recording ad-hoc values (e.g., latency for incoming requests) can't take advantage of this. CH Compat

func (*Histogram) RecordDuration Uses

func (h *Histogram) RecordDuration(v time.Duration) error

RecordDuration records the given time.Duration in seconds, returning an error if the value is out of range.

func (*Histogram) RecordIntScale Uses

func (h *Histogram) RecordIntScale(val int64, scale int) error

RecordIntScale records an integer scaler value, returning an error if the value is out of range.

func (*Histogram) RecordIntScales Uses

func (h *Histogram) RecordIntScales(val int64, scale int, n int64) error

RecordIntScales records n occurrences of the given value, returning an error if the value is out of range.

func (*Histogram) RecordValue Uses

func (h *Histogram) RecordValue(v float64) error

RecordValue records the given value, returning an error if the value is out of range.

func (*Histogram) RecordValues Uses

func (h *Histogram) RecordValues(v float64, n int64) error

RecordValues records n occurrences of the given value, returning an error if the value is out of range.

func (*Histogram) Reset Uses

func (h *Histogram) Reset()

Reset forgets all bins in the histogram (they remain allocated)

func (*Histogram) Serialize Uses

func (h *Histogram) Serialize(w io.Writer) error

func (*Histogram) SerializeB64 Uses

func (h *Histogram) SerializeB64(w io.Writer) error

func (*Histogram) SignificantFigures Uses

func (h *Histogram) SignificantFigures() int64

SignificantFigures returns the significant figures used to create the histogram CH Compat

func (*Histogram) UnmarshalJSON Uses

func (h *Histogram) UnmarshalJSON(b []byte) error

UnmarshalJSON - histogram will come in a base64 encoded serialized form

func (*Histogram) ValueAtQuantile Uses

func (h *Histogram) ValueAtQuantile(q float64) float64

ValueAtQuantile returns the recorded value at the given quantile (0..1).

Package circonusllhist imports 12 packages (graph) and is imported by 8 packages. Updated 2019-10-22. Refresh now. Tools for package owners.