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

Method set_memory_bytes

nodedb/src/control/metrics/database.rs:88–92  ·  view source on GitHub ↗

Set the memory-bytes gauge for `db_name`.

(&self, db_name: &str, bytes: u64)

Source from the content-addressed store, hash-verified

86
87 /// Set the memory-bytes gauge for `db_name`.
88 pub fn set_memory_bytes(&self, db_name: &str, bytes: u64) {
89 self.get_or_create(db_name)
90 .memory_bytes
91 .store(bytes, Ordering::Relaxed);
92 }
93
94 /// Set the storage-bytes gauge for `db_name`.
95 pub fn set_storage_bytes(&self, db_name: &str, bytes: u64) {

Callers

nothing calls this directly

Calls 2

storeMethod · 0.45
get_or_createMethod · 0.45

Tested by

no test coverage detected