MCPcopy Create free account
hub / github.com/CovenantSQL/CovenantSQL / getDiskStats

Function getDiskStats

metric/diskstats_linux.go:189–197  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

187}
188
189func getDiskStats() (map[string]map[int]string, error) {
190 file, err := os.Open(procFilePath("diskstats"))
191 if err != nil {
192 return nil, err
193 }
194 defer file.Close()
195
196 return parseDiskStats(file)
197}
198
199func parseDiskStats(r io.Reader) (map[string]map[int]string, error) {
200 var (

Callers 1

UpdateMethod · 0.85

Calls 4

procFilePathFunction · 0.85
parseDiskStatsFunction · 0.85
CloseMethod · 0.65
OpenMethod · 0.45

Tested by

no test coverage detected