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

Function extendedPrecisionStats

xfs/parse.go:423–433  ·  view source on GitHub ↗

ExtendedPrecisionStats builds an ExtendedPrecisionStats from a slice of uint32s.

(us []uint64)

Source from the content-addressed store, hash-verified

421
422// ExtendedPrecisionStats builds an ExtendedPrecisionStats from a slice of uint32s.
423func extendedPrecisionStats(us []uint64) (ExtendedPrecisionStats, error) {
424 if l := len(us); l != 3 {
425 return ExtendedPrecisionStats{}, fmt.Errorf("incorrect number of values for XFS extended precision stats: %d", l)
426 }
427
428 return ExtendedPrecisionStats{
429 FlushBytes: us[0],
430 WriteBytes: us[1],
431 ReadBytes: us[2],
432 }, nil
433}
434
435func quotaManagerStats(us []uint32) (QuotaManagerStats, error) {
436 // The "Unused" attribute first appears in Linux 4.20

Callers 1

ParseStatsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected