]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
perfcounter: assert when you try and set an average.
authorGreg Farnum <gregory.farnum@dreamhost.com>
Wed, 26 Oct 2011 23:04:45 +0000 (16:04 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Tue, 8 Nov 2011 17:50:29 +0000 (09:50 -0800)
If you're trying to set an average, you're probably doing it wrong.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/common/perf_counters.cc

index 27fb2af563c62a6988e18edcf6d73a313dd098ef..9936524a0c52284d9a8bf66be3920fc89e63a2cb 100644 (file)
@@ -147,7 +147,7 @@ void PerfCounters::fset(int idx, double amt)
     return;
   data.u.dbl = amt;
   if (data.type & PERFCOUNTER_LONGRUNAVG)
-    data.avgcount++;
+    assert(0);
 }
 
 double PerfCounters::fget(int idx) const