From 666a543ed82896c972526ef08476a41ccbfbd2c4 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Thu, 24 Nov 2022 13:20:59 +0100 Subject: Fix disk usage stats (#194) * Improve tracking of used disk space for filecas and compactcas Add tracking of used disk space for project store Remove ZenCacheStore as GcStorage/GcContributor - underlying ZenCacheNamespace instances register themselves directly - removing this also fixes double reporting of GcStorageSize for namespaces * changelog --- zenstore/gc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'zenstore/gc.cpp') diff --git a/zenstore/gc.cpp b/zenstore/gc.cpp index 0902abf4a..8aac65bb4 100644 --- a/zenstore/gc.cpp +++ b/zenstore/gc.cpp @@ -908,7 +908,9 @@ TEST_CASE("gc.full") CHECK(ChunkHashes[8] == IoHash::HashBuffer(CasStore->FindChunk(ChunkHashes[8]))); auto FinalSize = CasStore->TotalSize(); - CHECK(InitialSize.TinySize == FinalSize.TinySize); + + CHECK_LE(InitialSize.TinySize, FinalSize.TinySize); + CHECK_GE(InitialSize.TinySize + (1u << 28), FinalSize.TinySize); } #endif -- cgit v1.2.3