MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / compacted_bytes

Function compacted_bytes

atomic-repository/tests/span_storage_guard.rs:60–66  ·  view source on GitHub ↗

Raw compaction is confined to this disposable fixture, after the supported repository handle and all transactions have closed. Never a live migration.

(root: &Path)

Source from the content-addressed store, hash-verified

58// Raw compaction is confined to this disposable fixture, after the supported
59// repository handle and all transactions have closed. Never a live migration.
60fn compacted_bytes(root: &Path) -> u64 {
61 let path = root.join(".atomic/atomic.redb");
62 let mut db = redb::Database::open(&path).unwrap();
63 db.compact().unwrap();
64 drop(db);
65 std::fs::metadata(path).unwrap().len()
66}
67
68#[test]
69fn small_native_edits_keep_span_graph_rows_constant_and_database_growth_bounded() {

Callers 1

storage_guardFunction · 0.85

Calls 5

compactMethod · 0.80
openFunction · 0.50
metadataFunction · 0.50
unwrapMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected