Documentation ¶
Index ¶
- Variables
- func CPUInfo() ([]cpu.InfoStat, error)
- func CaptureRuntimeCPUStats(ctx context.Context, d time.Duration)
- func CaptureRuntimeCPUStatsOnce(r metrics.Registry)
- func CaptureRuntimeDiskStats(ctx context.Context, d time.Duration)
- func CaptureRuntimeDiskStatsOnce(r metrics.Registry)
- func CaptureRuntimeNetStats(ctx context.Context, d time.Duration)
- func CaptureRuntimeNetStatsOnce(r metrics.Registry)
- func DiskInfo() (*disk.UsageStat, error)
- func Duration(invocation time.Time, name string)
- func Host() (*host.InfoStat, error)
- func Interfaces() ([]net.IOCountersStat, error)
- func RegisterDiskStats(r metrics.Registry)
- func RegisterRuntimeCPUStats(r metrics.Registry)
- func RegisterRuntimeNetworkStats(r metrics.Registry)
- func Users() ([]host.UserStat, error)
- type CPUStat
- type IOCounterStats
- type NetStat
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SystemRegistry = metrics.NewPrefixedChildRegistry(metrics.DefaultRegistry, "/system/") PerformanceRegistry = metrics.NewPrefixedChildRegistry(metrics.DefaultRegistry, "/performance/") )
Functions ¶
func CaptureRuntimeCPUStats ¶
CaptureRuntimeCPUStats Capture cpu status
func CaptureRuntimeCPUStatsOnce ¶
func CaptureRuntimeCPUStatsOnce(r metrics.Registry)
CaptureRuntimeCPUStatsOnce Capture cpu status once
func CaptureRuntimeDiskStatsOnce ¶
func CaptureRuntimeDiskStatsOnce(r metrics.Registry)
func CaptureRuntimeNetStatsOnce ¶
func CaptureRuntimeNetStatsOnce(r metrics.Registry)
func Interfaces ¶
func Interfaces() ([]net.IOCountersStat, error)
func RegisterDiskStats ¶
func RegisterDiskStats(r metrics.Registry)
func RegisterRuntimeCPUStats ¶
func RegisterRuntimeCPUStats(r metrics.Registry)
RegisterRuntimeCPUStats register cpu metrics to registry
func RegisterRuntimeNetworkStats ¶
func RegisterRuntimeNetworkStats(r metrics.Registry)
Types ¶
type CPUStat ¶
type CPUStat struct { User metrics.GaugeFloat64 System metrics.GaugeFloat64 Idle metrics.GaugeFloat64 Nice metrics.GaugeFloat64 Iowait metrics.GaugeFloat64 Irq metrics.GaugeFloat64 Softirq metrics.GaugeFloat64 Steal metrics.GaugeFloat64 Guest metrics.GaugeFloat64 GuestNice metrics.GaugeFloat64 ReadCpuStats metrics.Timer }
CPUStat cpu metrics holder
type IOCounterStats ¶
type IOCounterStats struct { ReadCount metrics.Gauge MergedReadCount metrics.Gauge WriteCount metrics.Gauge MergedWriteCount metrics.Gauge ReadBytes metrics.Gauge WriteBytes metrics.Gauge ReadTime metrics.Gauge WriteTime metrics.Gauge IopsInProgress metrics.Gauge IoTime metrics.Gauge WeightedIO metrics.Gauge }
Click to show internal directories.
Click to hide internal directories.