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

Method total_size_bytes

nodedb-wal/src/segmented.rs:239–242  ·  view source on GitHub ↗

Total WAL size on disk across all segments.

(&self)

Source from the content-addressed store, hash-verified

237
238 /// Total WAL size on disk across all segments.
239 pub fn total_size_bytes(&self) -> Result<u64> {
240 let segments = discover_segments(&self.wal_dir)?;
241 Ok(segments.iter().map(|s| s.file_size).sum())
242 }
243
244 /// Roll to a new segment: seal the current writer and create a new one.
245 fn roll_segment(&mut self) -> Result<()> {

Callers 1

total_size_bytesFunction · 0.45

Calls 3

discover_segmentsFunction · 0.85
sumMethod · 0.80
iterMethod · 0.45

Tested by 1

total_size_bytesFunction · 0.36