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