btreeStats builds a BTreeStats from a slice of uint32s.
(us []uint32)
| 211 | |
| 212 | // btreeStats builds a BTreeStats from a slice of uint32s. |
| 213 | func btreeStats(us []uint32) (BTreeStats, error) { |
| 214 | if l := len(us); l != 4 { |
| 215 | return BTreeStats{}, fmt.Errorf("incorrect number of values for XFS btree stats: %d", l) |
| 216 | } |
| 217 | |
| 218 | return BTreeStats{ |
| 219 | Lookups: us[0], |
| 220 | Compares: us[1], |
| 221 | RecordsInserted: us[2], |
| 222 | RecordsDeleted: us[3], |
| 223 | }, nil |
| 224 | } |
| 225 | |
| 226 | // BlockMappingStat builds a BlockMappingStats from a slice of uint32s. |
| 227 | func blockMappingStats(us []uint32) (BlockMappingStats, error) { |
no outgoing calls
no test coverage detected
searching dependent graphs…