in cgroup/blkio.go [192:214]
func collectOpValues(values []blkioValue) map[DeviceID]*OperationValues {
opValues := map[DeviceID]*OperationValues{}
for _, bv := range values {
opValue := opValues[bv.DeviceID]
if opValue == nil {
opValue = &OperationValues{}
opValues[bv.DeviceID] = opValue
}
switch bv.Operation {
case "read":
opValue.Read = bv.Value
case "write":
opValue.Write = bv.Value
case "async":
opValue.Async = bv.Value
case "sync":
opValue.Sync = bv.Value
}
}
return opValues
}