]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/common/perf_counters.h
update sources to v12.1.2
[ceph.git] / ceph / src / common / perf_counters.h
index 5eaa59fb699afbea32d557716443b3cc78a69b4b..e831b73ad68233b4e964fba74fadc4d7fc1b6227 100644 (file)
@@ -133,11 +133,9 @@ public:
     pair<uint64_t, T> last;
     pair<uint64_t, T> cur;
     avg_tracker() : last(0, 0), cur(0, 0) {}
-    T avg() const {
+    T current_avg() const {
       if (cur.first == last.first)
-       return cur.first ?
-         cur.second / cur.first :
-         0; // no change, report avg over all time
+        return 0;
       return (cur.second - last.second) / (cur.first - last.first);
     }
     void consume_next(const pair<uint64_t, T> &next) {