Fix bug counting misses in chains with no permanent caches.

This commit is contained in:
Logan Hanks
2011-11-16 12:19:34 -08:00
parent 97c36b1f15
commit 709dd35261

View File

@@ -439,6 +439,10 @@ class CacheChain(CacheUtils, local):
if v != NoneResult)
if self.stats:
if not misses:
# If this chain contains no permanent caches, then we need to
# count the misses here.
misses = len(need)
self.stats.cache_hit(hits)
self.stats.cache_miss(misses)