diff options
| author | Stefan Boberg <[email protected]> | 2021-10-02 16:51:27 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-10-02 16:51:27 +0200 |
| commit | b049249d3285dbe73d608431038f2502c779c2f1 (patch) | |
| tree | 48239dc1f1ecfff5274d6697209f7a3a0305af14 /zenserver/cache/structuredcache.cpp | |
| parent | zen: added print/printpackage subcommands to help in debugging or inspecting ... (diff) | |
| download | zen-b049249d3285dbe73d608431038f2502c779c2f1.tar.xz zen-b049249d3285dbe73d608431038f2502c779c2f1.zip | |
structured cache: Added some more stats (hits/misses/upstream_hits)
Diffstat (limited to 'zenserver/cache/structuredcache.cpp')
| -rw-r--r-- | zenserver/cache/structuredcache.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/zenserver/cache/structuredcache.cpp b/zenserver/cache/structuredcache.cpp index 8ab0276c5..dc22a15d1 100644 --- a/zenserver/cache/structuredcache.cpp +++ b/zenserver/cache/structuredcache.cpp @@ -868,7 +868,9 @@ HttpStructuredCacheService::HandleStatusRequest(zen::HttpServerRequest& Request) const uint64_t TotalCount = HitCount + MissCount; Cbo.BeginObject("cache"); + Cbo << "hits" << HitCount << "misses" << MissCount; Cbo << "hit_ratio" << (TotalCount > 0 ? (double(HitCount) / double(TotalCount) * 100.0) : 0.0); + Cbo << "upstream_hits" << m_CacheStats.UpstreamHitCount; Cbo << "upstream_ratio" << (HitCount > 0 ? (double(UpstreamHitCount) / double(HitCount)) * 100.0 : 0.0); Cbo.EndObject(); |