Documentation ¶
Index ¶
- type Histogram
- func (h *Histogram) Add(other *Histogram)
- func (h *Histogram) Clone() *Histogram
- func (h Histogram) Mean() uint64
- func (h *Histogram) Sample(v uint64)
- func (h *Histogram) SampleLen(l int)
- func (h *Histogram) SampleTimeSince(t time.Time)
- func (h Histogram) Samples() uint64
- func (h Histogram) String() string
- func (h Histogram) Sum() uint64
- type HistogramType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Histogram ¶
type Histogram struct {
// contains filtered or unexported fields
}
func NewByteHistogram ¶
func NewByteHistogram() Histogram
NewByteHistogram stringifies values using humanize over byte values
func NewTimeHistogram ¶
func NewTimeHistogram() Histogram
func (*Histogram) Add ¶
Add returns a new Histogram which is the result of adding this and other bucket-wise.
func (*Histogram) SampleLen ¶
SampleLen is a convenience wrapper around Sample which internally type asserts the int to a uint64
func (*Histogram) SampleTimeSince ¶
SampleTimeSince is a convenience wrapper around Sample which takes the duration since |t|, if 0, rounds to 1 and passes to Sample() as an uint64 number of nanoseconds.
type HistogramType ¶
type HistogramType uint64
const ( UnspecifiedHistogram HistogramType = iota TimeHistogram ByteHistogram )
Click to show internal directories.
Click to hide internal directories.