gitee.com/liuxuezhan/go-micro-v1.18.0@v1.0.0/debug/stats/stats.go (about) 1 // Package stats provides runtime stats 2 package stats 3 4 // Stats provides stats interface 5 type Stats interface { 6 // Read stat snapshot 7 Read() ([]*Stat, error) 8 // Write a stat snapshot 9 Write(*Stat) error 10 } 11 12 // A runtime stat 13 type Stat struct { 14 // Timestamp of recording 15 Timestamp int64 16 // Start time as unix timestamp 17 Started int64 18 // Uptime in seconds 19 Uptime int64 20 // Memory usage in bytes 21 Memory uint64 22 // Threads aka go routines 23 Threads uint64 24 // Garbage collection in nanoseconds 25 GC uint64 26 }