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

Function total_size_bytes

nodedb-wal/src/segmented.rs:493–504  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

491
492 #[test]
493 fn total_size_bytes() {
494 let dir = tempfile::tempdir().unwrap();
495 let wal_dir = dir.path().join("wal");
496
497 let mut wal = SegmentedWal::open(test_config(&wal_dir)).unwrap();
498 wal.append(RecordType::Put as u32, 1, 0, 0, b"data")
499 .unwrap();
500 wal.sync().unwrap();
501
502 let size = wal.total_size_bytes().unwrap();
503 assert!(size > 0);
504 }
505
506 #[test]
507 fn reopen_continues_lsn() {

Callers

nothing calls this directly

Calls 7

joinMethod · 0.80
test_configFunction · 0.70
openFunction · 0.50
pathMethod · 0.45
appendMethod · 0.45
syncMethod · 0.45
total_size_bytesMethod · 0.45

Tested by

no test coverage detected