Sum of all shard weights.
(&self)
| 333 | |
| 334 | /// Sum of all shard weights. |
| 335 | fn total_weight(&self) -> u64 { |
| 336 | self.shards |
| 337 | .values() |
| 338 | .map(|s| s.weight as u64) |
| 339 | .sum::<u64>() |
| 340 | .max(1) |
| 341 | } |
| 342 | |
| 343 | /// Evict one entry from the shard with the highest overshoot ratio. |
| 344 | /// |
no outgoing calls
no test coverage detected