BufferStats builds a BufferStats from a slice of uint32s.
(us []uint32)
| 402 | |
| 403 | // BufferStats builds a BufferStats from a slice of uint32s. |
| 404 | func 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. |
| 423 | func extendedPrecisionStats(us []uint64) (ExtendedPrecisionStats, error) { |
no outgoing calls
no test coverage detected
searching dependent graphs…