BlockMappingStat builds a BlockMappingStats from a slice of uint32s.
(us []uint32)
| 225 | |
| 226 | // BlockMappingStat builds a BlockMappingStats from a slice of uint32s. |
| 227 | func blockMappingStats(us []uint32) (BlockMappingStats, error) { |
| 228 | if l := len(us); l != 7 { |
| 229 | return BlockMappingStats{}, fmt.Errorf("incorrect number of values for XFS block mapping stats: %d", l) |
| 230 | } |
| 231 | |
| 232 | return BlockMappingStats{ |
| 233 | Reads: us[0], |
| 234 | Writes: us[1], |
| 235 | Unmaps: us[2], |
| 236 | ExtentListInsertions: us[3], |
| 237 | ExtentListDeletions: us[4], |
| 238 | ExtentListLookups: us[5], |
| 239 | ExtentListCompares: us[6], |
| 240 | }, nil |
| 241 | } |
| 242 | |
| 243 | // DirectoryOperationStats builds a DirectoryOperationStats from a slice of uint32s. |
| 244 | func directoryOperationStats(us []uint32) (DirectoryOperationStats, error) { |
no outgoing calls
no test coverage detected
searching dependent graphs…