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 ¶
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).
Click to show internal directories.
Click to hide internal directories.