blob: cc9948397268bbfd54a7f788f8dca78bf54f3cfe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
package stats
// NetStamp holds network stats and timestamp for delta calculation.
type NetStamp struct {
B int64
Tb int64
Stamp float64
}
// DiskStamp holds disk I/O stats and timestamp for delta calculation.
type DiskStamp struct {
SectorsRead int64
SectorsWrite int64
IoTicks int64
Stamp float64
}
// HostStats holds the latest stats for one host (read-only snapshot).
type HostStats struct {
LoadAvg1, LoadAvg5, LoadAvg15 string
Mem map[string]int64
Net map[string]NetStamp
CPU map[string]CPULine
Disk map[string]DiskStamp
}
// Source is the interface the display uses to read current stats.
type Source interface {
Snapshot() map[string]*HostStats
}
|