From bf20e4c8e63638792e69098d4d9810c1136ff627 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Thu, 28 Sep 2023 23:57:31 +0200 Subject: adding more stats (#429) - Feature: Add detailed stats on requests and data sizes on a per-bucket level, use parameter `cachestorestats=true` on the `/stats/z$` endpoint to enable - Feature: Add detailed stats on requests and data sizes on cidstore, use parameter `cidstorestats=true` on the `/stats/z$` endpoint to enable - Feature: Dashboard now accepts parameters in the URL which is passed on to the `/stats/z$` endpoint --- src/zenserver/projectstore/httpprojectstore.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/zenserver/projectstore/httpprojectstore.cpp') diff --git a/src/zenserver/projectstore/httpprojectstore.cpp b/src/zenserver/projectstore/httpprojectstore.cpp index 7ab847c73..3edcf5903 100644 --- a/src/zenserver/projectstore/httpprojectstore.cpp +++ b/src/zenserver/projectstore/httpprojectstore.cpp @@ -376,6 +376,9 @@ void HttpProjectService::HandleRequest(HttpServerRequest& Request) { m_ProjectStats.RequestCount++; + + metrics::OperationTiming::Scope $(m_HttpRequests); + if (m_Router.HandleRequest(Request) == false) { m_ProjectStats.BadRequestCount++; @@ -392,6 +395,9 @@ HttpProjectService::HandleStatsRequest(HttpServerRequest& HttpReq) const CidStoreSize CidSize = m_CidStore.TotalSize(); CbObjectWriter Cbo; + + EmitSnapshot("requests", m_HttpRequests, Cbo); + Cbo.BeginObject("store"); { Cbo.BeginObject("size"); -- cgit v1.2.3