diff options
| author | Dan Engelbrecht <[email protected]> | 2026-03-27 16:23:59 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-03-27 16:23:59 +0100 |
| commit | aff16da9a634ff6869b0394bf936bbb45096ad54 (patch) | |
| tree | 3d88cc842e6a87c3e4d07cc838a31b8dbabfce9a /src/zenserver/storage/projectstore | |
| parent | remove CPR HTTP client backend (#894) (diff) | |
| download | zen-aff16da9a634ff6869b0394bf936bbb45096ad54.tar.xz zen-aff16da9a634ff6869b0394bf936bbb45096ad54.zip | |
dashboard improvements (#896)
- Feature: Added Workspaces dashboard page with HTTP request stats and per-workspace metrics
- Feature: Added Build Storage dashboard page with service-specific HTTP request stats
- Improvement: Front page now shows Hub and Object Store activity tiles; HTTP panel is fixed above the tiles grid
- Improvement: HTTP stats tiles now include 5m/15m rates and p999/max latency across all service pages
Diffstat (limited to 'src/zenserver/storage/projectstore')
| -rw-r--r-- | src/zenserver/storage/projectstore/httpprojectstore.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/zenserver/storage/projectstore/httpprojectstore.cpp b/src/zenserver/storage/projectstore/httpprojectstore.cpp index 9d132a22a..a7c8c66b6 100644 --- a/src/zenserver/storage/projectstore/httpprojectstore.cpp +++ b/src/zenserver/storage/projectstore/httpprojectstore.cpp @@ -848,12 +848,6 @@ HttpProjectService::HandleStatusRequest(HttpServerRequest& Request) void HttpProjectService::HandleStatsRequest(HttpServerRequest& HttpReq) { - HttpReq.WriteResponse(HttpResponseCode::OK, CollectStats()); -} - -CbObject -HttpProjectService::CollectStats() -{ ZEN_TRACE_CPU("ProjectService::Stats"); const GcStorageSize StoreSize = m_ProjectStore->StorageSize(); @@ -863,6 +857,8 @@ HttpProjectService::CollectStats() EmitSnapshot("requests", m_HttpRequests, Cbo); + Cbo << "project_count" << (uint64_t)m_ProjectStore->ProjectCount(); + Cbo.BeginObject("store"); { Cbo.BeginObject("size"); @@ -918,6 +914,18 @@ HttpProjectService::CollectStats() } Cbo.EndObject(); + HttpReq.WriteResponse(HttpResponseCode::OK, Cbo.Save()); +} + +CbObject +HttpProjectService::CollectStats() +{ + CbObjectWriter Cbo; + // CollectStats does not use the HandleStatsRequest implementation to get stats since it uses some heavy operations such as + // m_ProjectStore->StorageSize(); + EmitSnapshot("requests", m_HttpRequests, Cbo); + Cbo << "project_count" << (uint64_t)m_ProjectStore->ProjectCount(); + return Cbo.Save(); } |