scaleobs

package
v0.7.21 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultDurationBuckets = []time.Duration{
	5 * time.Millisecond,
	10 * time.Millisecond,
	25 * time.Millisecond,
	50 * time.Millisecond,
	100 * time.Millisecond,
	250 * time.Millisecond,
	500 * time.Millisecond,
	time.Second,
	5 * time.Second,
}

Functions

func Add

func Add(m *expvar.Map, key string, delta int64)

func IntValue

func IntValue(v expvar.Var) int64

func Key

func Key(in string) string

func Set

func Set(m *expvar.Map, key string, value int64)

Types

type DurationBuckets

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

func NewDurationBuckets

func NewDurationBuckets(name string, bounds ...time.Duration) *DurationBuckets

func (*DurationBuckets) Count

func (b *DurationBuckets) Count() int64

func (*DurationBuckets) Observe

func (b *DurationBuckets) Observe(elapsed time.Duration)

func (*DurationBuckets) Value

func (b *DurationBuckets) Value(label string) int64

type NestedDurationBuckets

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

NestedDurationBuckets is a two-level expvar histogram: the outer map key is a caller label (e.g. create stage name) and inner keys are le_* buckets. The observability scraper emits these as key/key2 Prometheus labels.

func NewNestedDurationBuckets

func NewNestedDurationBuckets(name string, bounds ...time.Duration) *NestedDurationBuckets

func (*NestedDurationBuckets) Observe

func (n *NestedDurationBuckets) Observe(label string, elapsed time.Duration)

func (*NestedDurationBuckets) Value

func (n *NestedDurationBuckets) Value(label, bucket string) int64

Value returns the bucket count for a label pair (tests and diagnostics).

Jump to

Keyboard shortcuts

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