diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-06-22 12:47:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-22 12:47:29 +0200 |
commit | 93ca669d40868468a26f32b96bef90b088ef9e17 (patch) | |
tree | e5edce298dce7e5af519bcc07ab938fd5dbf30ae /vespalib | |
parent | 67fe9c6d3ee4ec4ef07596f3da27b1e291a2189d (diff) | |
parent | 4ad0b1877788473d6e6cd004b3300dbe4e0e0147 (diff) |
Merge pull request #27509 from vespa-engine/balder/move-count-internal-strucures-cache-structures-correctly
Balder/move count internal strucures cache structures correctly
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/vespa/vespalib/stllike/cache.h | 2 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/stllike/cache.hpp | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/vespalib/src/vespa/vespalib/stllike/cache.h b/vespalib/src/vespa/vespalib/stllike/cache.h index f7456cda197..97ba23aba65 100644 --- a/vespalib/src/vespa/vespalib/stllike/cache.h +++ b/vespalib/src/vespa/vespalib/stllike/cache.h @@ -110,7 +110,7 @@ public: */ bool hasKey(const K & key) const; - CacheStats get_stats() const; + virtual CacheStats get_stats() const; size_t getHit() const { return _hit.load(std::memory_order_relaxed); } size_t getMiss() const { return _miss.load(std::memory_order_relaxed); } diff --git a/vespalib/src/vespa/vespalib/stllike/cache.hpp b/vespalib/src/vespa/vespalib/stllike/cache.hpp index 4e7736c9e5f..f767cf9812c 100644 --- a/vespalib/src/vespa/vespalib/stllike/cache.hpp +++ b/vespalib/src/vespa/vespalib/stllike/cache.hpp @@ -61,9 +61,7 @@ cache<P>::getStaticMemoryUsage() const { MemoryUsage usage; auto cacheGuard = getGuard(); usage.incAllocatedBytes(sizeof(*this)); - usage.incAllocatedBytes(Lru::capacity()*sizeof(typename Lru::value_type)); usage.incUsedBytes(sizeof(*this)); - usage.incUsedBytes(Lru::size()*sizeof(typename Lru::value_type)); return usage; } |