diff options
| author | Stefan Boberg <[email protected]> | 2021-10-01 22:15:42 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-10-01 22:15:42 +0200 |
| commit | 2a6157b15508541cfd082e8544c78c8f94b18005 (patch) | |
| tree | 7f70bd046afe918c5433e753a68de72ed602532a /zenserver/cache/structuredcache.h | |
| parent | Added explicit mimalloc IoBuffer allocation path (diff) | |
| parent | zen: added print/printpackage subcommands to help in debugging or inspecting ... (diff) | |
| download | zen-2a6157b15508541cfd082e8544c78c8f94b18005.tar.xz zen-2a6157b15508541cfd082e8544c78c8f94b18005.zip | |
Merge branch 'main' of https://github.com/EpicGames/zen
Diffstat (limited to 'zenserver/cache/structuredcache.h')
| -rw-r--r-- | zenserver/cache/structuredcache.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/zenserver/cache/structuredcache.h b/zenserver/cache/structuredcache.h index 47fc173e9..a360878bd 100644 --- a/zenserver/cache/structuredcache.h +++ b/zenserver/cache/structuredcache.h @@ -71,6 +71,13 @@ private: IoHash PayloadId; }; + struct CacheStats + { + std::atomic_uint64_t HitCount{}; + std::atomic_uint64_t UpstreamHitCount{}; + std::atomic_uint64_t MissCount{}; + }; + [[nodiscard]] bool ValidateKeyUri(zen::HttpServerRequest& Request, CacheRef& OutRef); void HandleCacheRecordRequest(zen::HttpServerRequest& Request, const CacheRef& Ref, CachePolicy Policy); void HandleGetCacheRecord(zen::HttpServerRequest& Request, const CacheRef& Ref, CachePolicy Policy); @@ -89,6 +96,7 @@ private: std::unique_ptr<UpstreamCache> m_UpstreamCache; uint64_t m_LastScrubTime = 0; metrics::OperationTiming m_HttpRequests; + CacheStats m_CacheStats; }; } // namespace zen |