diff options
| author | Stefan Boberg <[email protected]> | 2021-10-11 13:26:02 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-10-11 13:26:02 +0200 |
| commit | eab4a19e846df1696c1fac5b25ec0e7327e8d32b (patch) | |
| tree | 37a6ea15fd48e9dfef3705b18852a8de1ef78c54 /zenserver/upstream/upstreamcache.cpp | |
| parent | stats: Added support for handler unregistration (diff) | |
| download | zen-eab4a19e846df1696c1fac5b25ec0e7327e8d32b.tar.xz zen-eab4a19e846df1696c1fac5b25ec0e7327e8d32b.zip | |
Ratios should not be percentages (this should be done in presentation)
Diffstat (limited to 'zenserver/upstream/upstreamcache.cpp')
| -rw-r--r-- | zenserver/upstream/upstreamcache.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zenserver/upstream/upstreamcache.cpp b/zenserver/upstream/upstreamcache.cpp index 5b2629f72..168449d05 100644 --- a/zenserver/upstream/upstreamcache.cpp +++ b/zenserver/upstream/upstreamcache.cpp @@ -697,7 +697,7 @@ struct UpstreamStats const double UpSpeed = UpBytes > 0 ? UpBytes / SecondsUp : 0.0; const double DownSpeed = DownBytes > 0 ? DownBytes / SecondsDown : 0.0; const uint64_t TotalCount = HitCount + MissCount; - const double HitRate = TotalCount > 0 ? (double(HitCount) / double(TotalCount)) * 100.0 : 0.0; + const double HitRate = TotalCount > 0 ? (double(HitCount) / double(TotalCount)) : 0.0; Logger.debug("STATS - '{}', Hit rate: {:.2f}%, DOWN: '{:.2f} MiB {:.2f} MiB/s', UP: '{:.2f} MiB {:.2f} MiB/s'", Ep->DisplayName(), @@ -842,7 +842,7 @@ public: const uint64_t HitCount = Stats.HitCount; const uint64_t MissCount = Stats.MissCount; const uint64_t TotalCount = HitCount + MissCount; - const double HitRate = TotalCount > 0 ? (double(HitCount) / double(TotalCount)) * 100.0 : 0.0; + const double HitRate = TotalCount > 0 ? (double(HitCount) / double(TotalCount)) : 0.0; Status << "hit_ratio" << HitRate; Status << "downloaded_mb" << Stats.DownBytes; |