(blkio container.BlkioStats)
| 214 | } |
| 215 | |
| 216 | func calculateBlockIO(blkio container.BlkioStats) (uint64, uint64) { |
| 217 | var blkRead, blkWrite uint64 |
| 218 | for _, bioEntry := range blkio.IoServiceBytesRecursive { |
| 219 | if len(bioEntry.Op) == 0 { |
| 220 | continue |
| 221 | } |
| 222 | switch bioEntry.Op[0] { |
| 223 | case 'r', 'R': |
| 224 | blkRead += bioEntry.Value |
| 225 | case 'w', 'W': |
| 226 | blkWrite += bioEntry.Value |
| 227 | } |
| 228 | } |
| 229 | return blkRead, blkWrite |
| 230 | } |
| 231 | |
| 232 | func calculateNetwork(network map[string]container.NetworkStats) (float64, float64) { |
| 233 | var rx, tx float64 |
no outgoing calls
searching dependent graphs…