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/objectstore/objectstore.cpp | |
| 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/objectstore/objectstore.cpp')
| -rw-r--r-- | src/zenserver/storage/objectstore/objectstore.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/zenserver/storage/objectstore/objectstore.cpp b/src/zenserver/storage/objectstore/objectstore.cpp index dec0c3cee..d6516fa1a 100644 --- a/src/zenserver/storage/objectstore/objectstore.cpp +++ b/src/zenserver/storage/objectstore/objectstore.cpp @@ -226,7 +226,7 @@ HttpObjectStoreService::HttpObjectStoreService(HttpStatsService& StatsService, H , m_StatusService(StatusService) , m_Cfg(std::move(Cfg)) { - Inititalize(); + Initialize(); m_StatsService.RegisterHandler("obj", *this); m_StatusService.RegisterHandler("obj", *this); } @@ -266,12 +266,19 @@ HttpObjectStoreService::HandleStatusRequest(HttpServerRequest& Request) void HttpObjectStoreService::HandleStatsRequest(HttpServerRequest& Request) { + Request.WriteResponse(HttpResponseCode::OK, CollectStats()); +} + +CbObject +HttpObjectStoreService::CollectStats() +{ + ZEN_TRACE_CPU("HttpObjectStoreService::Stats"); CbObjectWriter Cbo; EmitSnapshot("requests", m_HttpRequests, Cbo); Cbo << "total_bytes_served" << m_TotalBytesServed.load(); - Request.WriteResponse(HttpResponseCode::OK, Cbo.Save()); + return Cbo.Save(); } uint64_t @@ -281,12 +288,12 @@ HttpObjectStoreService::GetActivityCounter() } void -HttpObjectStoreService::Inititalize() +HttpObjectStoreService::Initialize() { - ZEN_TRACE_CPU("HttpObjectStoreService::Inititalize"); + ZEN_TRACE_CPU("HttpObjectStoreService::Initialize"); namespace fs = std::filesystem; - ZEN_LOG_INFO(LogObj, "Initialzing Object Store in '{}'", m_Cfg.RootDirectory); + ZEN_LOG_INFO(LogObj, "Initializing Object Store in '{}'", m_Cfg.RootDirectory); const fs::path BucketsPath = m_Cfg.RootDirectory / "buckets"; if (!IsDir(BucketsPath)) |