diff options
| author | Stefan Boberg <[email protected]> | 2021-09-30 10:39:39 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-30 10:39:39 +0200 |
| commit | 741fa349b8d860730d02a363fb6e5ff8f6f3fc82 (patch) | |
| tree | 02c79ffdbe4b6c5bc5bfb3932191a97b44579a09 /zenserver/cache/structuredcache.h | |
| parent | memory: Added experimental mimalloc path to AlignedAllocImpl/AlignedFreeImpl (diff) | |
| download | zen-741fa349b8d860730d02a363fb6e5ff8f6f3fc82.tar.xz zen-741fa349b8d860730d02a363fb6e5ff8f6f3fc82.zip | |
structured cache: Added stats test code (needs additional work / metrics)
Diffstat (limited to 'zenserver/cache/structuredcache.h')
| -rw-r--r-- | zenserver/cache/structuredcache.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/zenserver/cache/structuredcache.h b/zenserver/cache/structuredcache.h index 3fdaa1236..5dfff08ad 100644 --- a/zenserver/cache/structuredcache.h +++ b/zenserver/cache/structuredcache.h @@ -2,6 +2,7 @@ #pragma once +#include <zencore/stats.h> #include <zenhttp/httpserver.h> #include <memory> @@ -78,6 +79,7 @@ private: void HandleGetCachePayload(zen::HttpServerRequest& Request, const CacheRef& Ref, CachePolicy Policy); void HandlePutCachePayload(zen::HttpServerRequest& Request, const CacheRef& Ref, CachePolicy Policy); void HandleCacheBucketRequest(zen::HttpServerRequest& Request, std::string_view Bucket); + void HandleStatusRequest(zen::HttpServerRequest& Request); spdlog::logger& Log() { return m_Log; } spdlog::logger& m_Log; @@ -86,6 +88,8 @@ private: zen::CidStore& m_CidStore; std::unique_ptr<UpstreamCache> m_UpstreamCache; uint64_t m_LastScrubTime = 0; + + metrics::Histogram m_HttpRequests; }; } // namespace zen |