LogOperationStats builds a LogOperationStats from a slice of uint32s.
(us []uint32)
| 286 | |
| 287 | // LogOperationStats builds a LogOperationStats from a slice of uint32s. |
| 288 | func logOperationStats(us []uint32) (LogOperationStats, error) { |
| 289 | if l := len(us); l != 5 { |
| 290 | return LogOperationStats{}, fmt.Errorf("incorrect number of values for XFS log operation stats: %d", l) |
| 291 | } |
| 292 | |
| 293 | return LogOperationStats{ |
| 294 | Writes: us[0], |
| 295 | Blocks: us[1], |
| 296 | NoInternalBuffers: us[2], |
| 297 | Force: us[3], |
| 298 | ForceSleep: us[4], |
| 299 | }, nil |
| 300 | } |
| 301 | |
| 302 | // pushAilStats handles push_ail stats. |
| 303 | func pushAilStats(us []uint32) (PushAilStats, error) { |
no outgoing calls
no test coverage detected
searching dependent graphs…