diff options
| author | Dan Engelbrecht <[email protected]> | 2023-11-06 14:50:33 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-11-06 14:50:33 +0100 |
| commit | 0b184fd2a65852028672a7a0013ec794c7e0b071 (patch) | |
| tree | 8f2d6f8296016943c1544716a6110be58729b4c6 /src/zenstore/include | |
| parent | fixed issue where file log sink would get the wrong pattern assigned (#513) (diff) | |
| download | zen-0b184fd2a65852028672a7a0013ec794c7e0b071.tar.xz zen-0b184fd2a65852028672a7a0013ec794c7e0b071.zip | |
statsd for cas (#511)
* separate statsd interfaces so they can be accessible to zenstore
* statsd for cas
Diffstat (limited to 'src/zenstore/include')
| -rw-r--r-- | src/zenstore/include/zenstore/cidstore.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/zenstore/include/zenstore/cidstore.h b/src/zenstore/include/zenstore/cidstore.h index 1c8d79158..319683dcb 100644 --- a/src/zenstore/include/zenstore/cidstore.h +++ b/src/zenstore/include/zenstore/cidstore.h @@ -7,6 +7,7 @@ #include <zencore/iohash.h> #include <zencore/stats.h> #include <zenstore/hashkeyset.h> +#include <zenutil/statsreporter.h> ZEN_THIRD_PARTY_INCLUDES_START #include <tsl/robin_map.h> @@ -60,7 +61,7 @@ struct CidStoreConfiguration * */ -class CidStore final : public ChunkResolver +class CidStore final : public ChunkResolver, public StatsProvider { public: CidStore(GcManager& Gc); @@ -76,15 +77,17 @@ public: kMayBeMovedInPlace }; - void Initialize(const CidStoreConfiguration& Config); - InsertResult AddChunk(const IoBuffer& ChunkData, const IoHash& RawHash, InsertMode Mode = InsertMode::kMayBeMovedInPlace); - IoBuffer FindChunkByCid(const IoHash& DecompressedId); - bool ContainsChunk(const IoHash& DecompressedId); - void FilterChunks(HashKeySet& InOutChunks); - void Flush(); - void ScrubStorage(ScrubContext& Ctx); - CidStoreSize TotalSize() const; - CidStoreStats Stats() const; + void Initialize(const CidStoreConfiguration& Config); + InsertResult AddChunk(const IoBuffer& ChunkData, const IoHash& RawHash, InsertMode Mode = InsertMode::kMayBeMovedInPlace); + virtual IoBuffer FindChunkByCid(const IoHash& DecompressedId) override; + bool ContainsChunk(const IoHash& DecompressedId); + void FilterChunks(HashKeySet& InOutChunks); + void Flush(); + void ScrubStorage(ScrubContext& Ctx); + CidStoreSize TotalSize() const; + CidStoreStats Stats() const; + + virtual void ReportMetrics(StatsMetrics& Statsd) override; private: struct Impl; |