(metrics *v1.Metrics)
| 165 | } |
| 166 | |
| 167 | func calculateCgroupBlockIO(metrics *v1.Metrics) (uint64, uint64) { |
| 168 | var blkRead, blkWrite uint64 |
| 169 | for _, bioEntry := range metrics.Blkio.IoServiceBytesRecursive { |
| 170 | if len(bioEntry.Op) == 0 { |
| 171 | continue |
| 172 | } |
| 173 | switch bioEntry.Op[0] { |
| 174 | case 'r', 'R': |
| 175 | blkRead = blkRead + bioEntry.Value |
| 176 | case 'w', 'W': |
| 177 | blkWrite = blkWrite + bioEntry.Value |
| 178 | } |
| 179 | } |
| 180 | return blkRead, blkWrite |
| 181 | } |
| 182 | |
| 183 | func calculateCgroup2IO(metrics *v2.Metrics) (uint64, uint64) { |
| 184 | var ioRead, ioWrite uint64 |
no outgoing calls
no test coverage detected
searching dependent graphs…