Documentation ¶
Index ¶
- Variables
- func EnableMetrics()
- func MetricsEnabled() bool
- func NewCounter(name string, help string) *prometheus.Counter
- func NewCounterVec(name string, help string) *prometheus.CounterVec
- func NewGauge(name string, help string) *prometheus.Gauge
- func NewGaugeVec(name string, help string) *prometheus.GaugeVec
- func NewTimer(name string, help string) *prometheus.Timer
- func StartProcessMetrics()
- type CPUStats
- type Config
- type DiskStats
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ Enabled: false, EnabledExpensive: false, HTTP: "127.0.0.1", Port: 6060, }
DefaultConfig is the default config for metrics used in go-quai.
Functions ¶
func EnableMetrics ¶
func EnableMetrics()
func MetricsEnabled ¶
func MetricsEnabled() bool
func NewCounter ¶
func NewCounter(name string, help string) *prometheus.Counter
func NewCounterVec ¶
func NewCounterVec(name string, help string) *prometheus.CounterVec
func NewGaugeVec ¶
func NewGaugeVec(name string, help string) *prometheus.GaugeVec
func StartProcessMetrics ¶
func StartProcessMetrics()
Types ¶
type CPUStats ¶
type CPUStats struct { GlobalTime int64 // Time spent by the CPU working on all processes GlobalWait int64 // Time spent by waiting on disk for all processes LocalTime int64 // Time spent by the CPU working on this process }
CPUStats is the system and process CPU stats.
Click to show internal directories.
Click to hide internal directories.