diff options
| author | Per Larsson <[email protected]> | 2021-11-30 10:52:17 +0100 |
|---|---|---|
| committer | Per Larsson <[email protected]> | 2021-11-30 10:52:17 +0100 |
| commit | b4b599a1dd9f3b4da022c3729144f31550292f03 (patch) | |
| tree | 26889994acca6936002ebd0d91f8919eb0077f98 /zenstore/CAS.cpp | |
| parent | Added z$ memory/disk layer size. (diff) | |
| download | zen-b4b599a1dd9f3b4da022c3729144f31550292f03.tar.xz zen-b4b599a1dd9f3b4da022c3729144f31550292f03.zip | |
Added CAS total size.
Diffstat (limited to 'zenstore/CAS.cpp')
| -rw-r--r-- | zenstore/CAS.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/zenstore/CAS.cpp b/zenstore/CAS.cpp index 86c6eb849..d2ff1514e 100644 --- a/zenstore/CAS.cpp +++ b/zenstore/CAS.cpp @@ -105,6 +105,7 @@ public: virtual void Flush() override; virtual void Scrub(ScrubContext& Ctx) override; virtual void GarbageCollect(GcContext& GcCtx) override; + virtual CasStoreSize TotalSize() const override; private: CasContainerStrategy m_TinyStrategy; @@ -318,6 +319,16 @@ CasImpl::GarbageCollect(GcContext& GcCtx) m_LargeStrategy.CollectGarbage(GcCtx); } +CasStoreSize +CasImpl::TotalSize() const +{ + const uint64_t Tiny = m_TinyStrategy.TotalSize(); + const uint64_t Small = m_SmallStrategy.TotalSize(); + const uint64_t Large = m_LargeStrategy.TotalSize(); + + return {.TinySize = Tiny, .SmallSize = Small, .LargeSize = Large, .TotalSize = Tiny + Small + Large}; +} + ////////////////////////////////////////////////////////////////////////// CasStore* |