aggregate io r/w across all reported stats volumes

This commit is contained in:
Bradley Cicenas 2020-10-25 17:42:20 +00:00
parent e1a52a314d
commit c5038e2edd
No known key found for this signature in database
GPG Key ID: AF579ED4B93CBB5C
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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{}
}