]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: fix Finisher perf counter
authorJohn Spray <john.spray@redhat.com>
Tue, 12 Aug 2014 16:45:40 +0000 (17:45 +0100)
committerJohn Spray <john.spray@redhat.com>
Mon, 25 Aug 2014 00:34:18 +0000 (01:34 +0100)
This was declared as a long running average
but then .dec() was called on it, which
triggers an assertion.

You only have this problem if you pass a name
argument to Finisher::Finisher, which we mostly
don't do, but may as well fix this anyway.

Signed-off-by: John Spray <john.spray@redhat.com>
src/common/Finisher.h

index 229342079d8dbb1ef210634efe001efd05eb550e..236fecf3f6a0b9fa4d73a4bc397edd1cb6677143 100644 (file)
@@ -104,7 +104,7 @@ class Finisher {
     finisher_thread(this) {
     PerfCountersBuilder b(cct, string("finisher-") + name,
                          l_finisher_first, l_finisher_last);
-    b.add_time_avg(l_finisher_queue_len, "queue_len");
+    b.add_u64(l_finisher_queue_len, "queue_len");
     logger = b.create_perf_counters();
     cct->get_perfcounters_collection()->add(logger);
     logger->set(l_finisher_queue_len, 0);