MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / total_weight

Method total_weight

nodedb/src/engine/sparse/doc_cache.rs:335–341  ·  view source on GitHub ↗

Sum of all shard weights.

(&self)

Source from the content-addressed store, hash-verified

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 ///

Callers 2

putMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected