mirror of
https://github.com/bcicen/ctop.git
synced 2024-08-30 18:23:19 +00:00
aggregate io r/w across all reported stats volumes
This commit is contained in:
parent
e1a52a314d
commit
c5038e2edd
@ -114,10 +114,10 @@ func (c *Docker) ReadIO(stats *api.Stats) {
|
||||
var read, write int64
|
||||
for _, blk := range stats.BlkioStats.IOServiceBytesRecursive {
|
||||
if blk.Op == "Read" {
|
||||
read = int64(blk.Value)
|
||||
read += int64(blk.Value)
|
||||
}
|
||||
if blk.Op == "Write" {
|
||||
write = int64(blk.Value)
|
||||
write += int64(blk.Value)
|
||||
}
|
||||
}
|
||||
c.IOBytesRead, c.IOBytesWrite = read, write
|
||||
|
@ -22,7 +22,7 @@ type Connector interface {
|
||||
All() container.Containers
|
||||
// Get returns a single container.Container by ID
|
||||
Get(string) (*container.Container, bool)
|
||||
// Wait waits for the underlying connection to be lost before returning
|
||||
// Wait blocks until the underlying connection is lost
|
||||
Wait() struct{}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user