histogram

package
v0.0.0-...-b289748 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Histogram

type Histogram struct {
	Count          int64     `json:"count"`
	Sum            float64   `json:"sum"`
	CountPerBucket []int64   `json:"count_per_bucket"`
	Bounds         []float64 `json:"bounds"`
}
Histogram is a simple implementation of histogram expvar.Var.

`Bounds` specifies the histogram buckets as follows (length = len(bounds)):

(-inf, Bounds[i]) for i = 0
[Bounds[i-1], Bounds[i]) for 0 < i < length
[Bounds[i-1], +inf) for i = length

func (*Histogram) AddSample

func (h *Histogram) AddSample(v float64)

func (*Histogram) String

func (h *Histogram) String() string

Jump to

Keyboard shortcuts

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