aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/projectstore/httpprojectstore.h
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-08-14 13:01:55 +0200
committerGitHub <[email protected]>2023-08-14 13:01:55 +0200
commit126cd15dbca6e322360ece085563deba449926c6 (patch)
tree22d132c528b80bd5c8e61c3f75eb7e8fe6e5a4ac /src/zenserver/projectstore/httpprojectstore.h
parentupdate vcpkg dependencies (#356) (diff)
downloadzen-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.h20
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