MCPcopy Create free account
hub / github.com/prometheus/procfs / blockMappingStats

Function blockMappingStats

xfs/parse.go:227–241  ·  view source on GitHub ↗

BlockMappingStat builds a BlockMappingStats from a slice of uint32s.

(us []uint32)

Source from the content-addressed store, hash-verified

225
226// BlockMappingStat builds a BlockMappingStats from a slice of uint32s.
227func blockMappingStats(us []uint32) (BlockMappingStats, error) {
228 if l := len(us); l != 7 {
229 return BlockMappingStats{}, fmt.Errorf("incorrect number of values for XFS block mapping stats: %d", l)
230 }
231
232 return BlockMappingStats{
233 Reads: us[0],
234 Writes: us[1],
235 Unmaps: us[2],
236 ExtentListInsertions: us[3],
237 ExtentListDeletions: us[4],
238 ExtentListLookups: us[5],
239 ExtentListCompares: us[6],
240 }, nil
241}
242
243// DirectoryOperationStats builds a DirectoryOperationStats from a slice of uint32s.
244func directoryOperationStats(us []uint32) (DirectoryOperationStats, error) {

Callers 1

ParseStatsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…