add timestamp to stats
This commit is contained in:
@@ -3,17 +3,19 @@ package stats
|
||||
|
||||
// Stats provides stats interface
|
||||
type Stats interface {
|
||||
// Read a stat snapshot
|
||||
Read() (*Stat, error)
|
||||
// Read stat snapshot
|
||||
Read() ([]*Stat, error)
|
||||
// Write a stat snapshot
|
||||
Write(*Stat) error
|
||||
}
|
||||
|
||||
// A runtime stat
|
||||
type Stat struct {
|
||||
// Timestamp of recording
|
||||
Timestamp int64
|
||||
// Start time as unix timestamp
|
||||
Started int64
|
||||
// Uptime in nanoseconds
|
||||
// Uptime in seconds
|
||||
Uptime int64
|
||||
// Memory usage in bytes
|
||||
Memory uint64
|
||||
|
Reference in New Issue
Block a user