diff options
| author | Dan Engelbrecht <[email protected]> | 2023-08-14 13:01:55 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-08-14 13:01:55 +0200 |
| commit | 126cd15dbca6e322360ece085563deba449926c6 (patch) | |
| tree | 22d132c528b80bd5c8e61c3f75eb7e8fe6e5a4ac /src/zenserver/projectstore/httpprojectstore.h | |
| parent | update vcpkg dependencies (#356) (diff) | |
| download | zen-126cd15dbca6e322360ece085563deba449926c6.tar.xz zen-126cd15dbca6e322360ece085563deba449926c6.zip | |
project store stats (#357)
* add basic stats for project store
* stats for BadRequest in ProjectStore::Rpc
* changelog
* group stats
fix ChunkWriteCount when accepting ops
Diffstat (limited to 'src/zenserver/projectstore/httpprojectstore.h')
| -rw-r--r-- | src/zenserver/projectstore/httpprojectstore.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/zenserver/projectstore/httpprojectstore.h b/src/zenserver/projectstore/httpprojectstore.h index feb7ca82f..5842eb3ec 100644 --- a/src/zenserver/projectstore/httpprojectstore.h +++ b/src/zenserver/projectstore/httpprojectstore.h @@ -42,6 +42,23 @@ public: virtual void HandleStatsRequest(HttpServerRequest& Request) override; private: + struct ProjectStats + { + std::atomic_uint64_t ProjectReadCount{}; + std::atomic_uint64_t ProjectWriteCount{}; + std::atomic_uint64_t ProjectDeleteCount{}; + std::atomic_uint64_t OpLogReadCount{}; + std::atomic_uint64_t OpLogWriteCount{}; + std::atomic_uint64_t OpLogDeleteCount{}; + std::atomic_uint64_t OpHitCount{}; + std::atomic_uint64_t OpMissCount{}; + std::atomic_uint64_t OpWriteCount{}; + std::atomic_uint64_t ChunkHitCount{}; + std::atomic_uint64_t ChunkMissCount{}; + std::atomic_uint64_t ChunkWriteCount{}; + std::atomic_uint64_t BadRequestCount{}; + }; + inline spdlog::logger& Log() { return m_Log; } spdlog::logger& m_Log; @@ -50,6 +67,7 @@ private: Ref<ProjectStore> m_ProjectStore; HttpStatsService& m_StatsService; AuthMgr& m_AuthMgr; + ProjectStats m_ProjectStats; }; -} // namespace zen
\ No newline at end of file +} // namespace zen |