Documentation ¶
Overview ¶
Package metrics provides general system and process level metrics collection.
Index ¶
- Constants
- Variables
- func CollectProcessMetrics(refresh time.Duration)
- func NewCounter(name string) metrics.Counter
- func NewMeter(name string) metrics.Meter
- func NewTimer(name string) metrics.Timer
- func NewTransactionCounter(name string) metrics.Counter
- func ReadDiskStats(stats *DiskStats) error
- type DiskStats
Constants ¶
View Source
const DashboardEnabledFlag = "dashboard"
View Source
const MetricsEnabledFlag = "metrics"
MetricsEnabledFlag is the CLI flag name to use to enable metrics collections.
Variables ¶
View Source
var Enabled = false
Enabled is the flag specifying if metrics are enable or not.
Functions ¶
func CollectProcessMetrics ¶
CollectProcessMetrics periodically collects various metrics about the running process.
func NewCounter ¶
func NewCounter(name string) metrics.Counter
NewCounter create a new metrics Counter, either a real one of a NOP stub depending on the metrics flag.
func NewMeter ¶
func NewMeter(name string) metrics.Meter
NewMeter create a new metrics Meter, either a real one of a NOP stub depending on the metrics flag.
func NewTimer ¶
func NewTimer(name string) metrics.Timer
NewTimer create a new metrics Timer, either a real one of a NOP stub depending on the metrics flag.
func NewTransactionCounter ¶
func NewTransactionCounter(name string) metrics.Counter
func ReadDiskStats ¶
ReadDiskStats retrieves the disk IO stats belonging to the current process.
Types ¶
Click to show internal directories.
Click to hide internal directories.