Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
glandium committed Nov 19, 2023
1 parent 23f77dc commit d0b2092
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/cinnabar/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,6 @@ impl ManifestTreeCache {
})
.map(Clone::clone);
if self.queries >= self.lru_cache.cap().get() / 2 {
let miss_rate = self.misses / (self.queries / 10);
// Avoid growing the cache when we're flat-lining at 100% miss rate.
if miss_rate >= 7 && self.misses != self.queries {
self.lru_cache.resize(
NonZeroUsize::new(self.lru_cache.len() + self.lru_cache.len() / 2 + 1).unwrap(),
);
}
debug!(
target: "manifesttreecache",
"cap: {}, len: {} ; {} misses in the last {} queries ({:.1}%)",
Expand Down

0 comments on commit d0b2092

Please sign in to comment.