Graph the artwork thrown out, not the artwork kept (#198)

The sweep trims the cache to its limit, so the kept bytes it reports are the
limit every time once the cache has filled: the panel was two lines flat at
500 MiB. A counter of images thrown out says whether the limit is too small.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-11 20:15:11 +00:00
parent 12fadbd0f8
commit f032d50ed3
5 changed files with 13 additions and 4 deletions

View File

@@ -98,6 +98,7 @@ pub fn trim(dir: &Path, limit: u64) -> usize {
}
}
crate::metrics::STATS.art_cache_bytes.store(total, std::sync::atomic::Ordering::Relaxed);
crate::metrics::STATS.art_trimmed.fetch_add(gone as u64, std::sync::atomic::Ordering::Relaxed);
gone
}