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

Function bufferStats

xfs/parse.go:404–420  ·  view source on GitHub ↗

BufferStats builds a BufferStats from a slice of uint32s.

(us []uint32)

Source from the content-addressed store, hash-verified

402
403// BufferStats builds a BufferStats from a slice of uint32s.
404func bufferStats(us []uint32) (BufferStats, error) {
405 if l := len(us); l != 9 {
406 return BufferStats{}, fmt.Errorf("incorrect number of values for XFS buffer stats: %d", l)
407 }
408
409 return BufferStats{
410 Get: us[0],
411 Create: us[1],
412 GetLocked: us[2],
413 GetLockedWaited: us[3],
414 BusyLocked: us[4],
415 MissLocked: us[5],
416 PageRetries: us[6],
417 PageFound: us[7],
418 GetRead: us[8],
419 }, nil
420}
421
422// ExtendedPrecisionStats builds an ExtendedPrecisionStats from a slice of uint32s.
423func extendedPrecisionStats(us []uint64) (ExtendedPrecisionStats, 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…