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

Function btreeStats

xfs/parse.go:213–224  ·  view source on GitHub ↗

btreeStats builds a BTreeStats from a slice of uint32s.

(us []uint32)

Source from the content-addressed store, hash-verified

211
212// btreeStats builds a BTreeStats from a slice of uint32s.
213func btreeStats(us []uint32) (BTreeStats, error) {
214 if l := len(us); l != 4 {
215 return BTreeStats{}, fmt.Errorf("incorrect number of values for XFS btree stats: %d", l)
216 }
217
218 return BTreeStats{
219 Lookups: us[0],
220 Compares: us[1],
221 RecordsInserted: us[2],
222 RecordsDeleted: us[3],
223 }, nil
224}
225
226// BlockMappingStat builds a BlockMappingStats from a slice of uint32s.
227func blockMappingStats(us []uint32) (BlockMappingStats, 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…