GetStats collects all Bcachefs statistics from sysfs.
(uuidPath string)
| 77 | |
| 78 | // GetStats collects all Bcachefs statistics from sysfs. |
| 79 | func GetStats(uuidPath string) (*Stats, error) { |
| 80 | r := &reader{path: uuidPath} |
| 81 | s := r.readFilesystemStats() |
| 82 | if r.err != nil { |
| 83 | return nil, r.err |
| 84 | } |
| 85 | return s, nil |
| 86 | } |
| 87 | |
| 88 | type reader struct { |
| 89 | path string |
no test coverage detected