Documentation
¶
Overview ¶
Package runtimemetrics provides a reporter for metrics data collected by package "runtime/metrics".
This is a reporter for package "runtime/metrics" which will submit the metrics to a metrics.Interface. See:
https://pkg.go.dev/runtime/metrics https://pkg.go.dev/bitbucket.org/pcas/metrics
Example usage:
import ( "bitbucket.org/pcas/metrics/runtimemetrics" "bitbucket.org/pcastools/log" ) defer runtimemetrics.Start( m, // The destination metrics.Interface runtimemetrics.DefaultSet, // Use the default set of runtime metrics 0, // Use the default reporting interval log.Stderr, // Log any errors to stderr )()
Index ¶
Constants ¶
View Source
const DefaultInterval = 5 * time.Second
DefaultInterval is the default reporting interval.
Variables ¶
View Source
var DefaultSet = []string{
"/cpu/classes/gc/total:cpu-seconds",
"/cpu/classes/idle:cpu-seconds",
"/cpu/classes/user:cpu-seconds",
"/gc/cycles/total:gc-cycles",
"/memory/classes/heap/objects:bytes",
"/sched/goroutines/waiting:goroutines",
"/sched/goroutines:goroutines",
}
DefaultSet is the default set of metrics to collect. This set may be adjusted in future updates.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.