Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector manages the collection and storage of statistical data
func InitStatsCollector ¶
func InitStatsCollector() *Collector
type Stats ¶
type Stats struct {
Timestamp time.Time `json:"timestamp"`
SvrCPUUsage float64 `json:"svrCPUUsage"` // Overall CPU usage rate
SvrMemoryPct float64 `json:"svrMemoryPct"` // Total memory
LoadAverage [2]float64 `json:"loadAverage"` // 1, 5 minutes average load
CPUUsage float64 `json:"CPUUsage"` // Current process's CPU usage rate
MemoryUsage float64 `json:"memoryUsage"` // Current process's memory usage
MemoryUsagePct float64 `json.json:"memoryUsagePct"` // Current process's memory usage percentage
ThreadCount int `json:"threadCount"` // Current process's thread count
Goroutines int `json:"goroutines"` // Number of Go coroutines
HeapAlloc float64 `json:"heapAlloc"` // Memory allocated in the heap currently
HeapSys float64 `json:"heapSys"` // Total heap memory obtained from the system
HeapInuse float64 `json:"heapInuse"` // Heap memory in use
HeapPct float64 `json:"heapPct"` // Percentage of heap memory obtained from the system
LoginCount int `json:"loginCount"` // Online users
GuestCount int `json.json:"guestCount"` // Visitors
Connections int `json:"connections"` // Current process's network connections
SentRate float64 `json:"sentRate"` // Sending rate KB/s
RecvRate float64 `json:"recvRate"` // Receiving rate KB/s
MaxMemoryUsage float64 `json:"maxMemoryUsage"` // Maximum memory
MaxGoroutines int `json:"maxGoroutines"` // Maximum coroutines
}
Stats contains statistical data on CPU and memory usage
Click to show internal directories.
Click to hide internal directories.