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

Method write_amp_ratio

nodedb/src/engine/kv/index.rs:446–451  ·  view source on GitHub ↗

Write amplification ratio: total_index_writes / total_puts. Returns 0.0 if no PUTs have been performed.

(&self)

Source from the content-addressed store, hash-verified

444 ///
445 /// Returns 0.0 if no PUTs have been performed.
446 pub fn write_amp_ratio(&self) -> f64 {
447 if self.total_puts == 0 {
448 return 0.0;
449 }
450 self.total_index_writes as f64 / self.total_puts as f64
451 }
452
453 /// Lookup primary keys by exact field value match.
454 pub fn lookup_eq(&self, field: &str, value: &[u8]) -> Vec<&[u8]> {

Callers 1

write_amp_trackingFunction · 0.45

Calls

no outgoing calls

Tested by 1

write_amp_trackingFunction · 0.36