(raw string)
| 173 | } |
| 174 | |
| 175 | func parseKV(raw string) (string, uint64, error) { |
| 176 | parts := strings.Fields(raw) |
| 177 | switch len(parts) { |
| 178 | case 2: |
| 179 | v, err := parseUint(parts[1], 10, 64) |
| 180 | if err != nil { |
| 181 | return "", 0, err |
| 182 | } |
| 183 | return parts[0], v, nil |
| 184 | default: |
| 185 | return "", 0, ErrInvalidFormat |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | // ParseCgroupFile parses the given cgroup file, typically /proc/self/cgroup |
| 190 | // or /proc/<pid>/cgroup, into a map of subsystems to cgroup paths, e.g. |
no test coverage detected
searching dependent graphs…