]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: change 'bytes' dynamic perf counters to COUNTER type 25908/head
authorMykola Golub <mgolub@suse.com>
Fri, 11 Jan 2019 09:13:45 +0000 (09:13 +0000)
committerMykola Golub <mgolub@suse.com>
Fri, 11 Jan 2019 09:13:45 +0000 (09:13 +0000)
(so they are of the same type as in static perf)

Signed-off-by: Mykola Golub <mgolub@suse.com>
src/mgr/OSDPerfMetricTypes.cc
src/osd/DynamicPerfStats.h
src/pybind/mgr/prometheus/module.py

index 3d842edc1635c7fee4017a8db9cbd09c871ded21..06f7081d9aa42c5ec5bd6e2d4ab0f98a793636e7 100644 (file)
@@ -46,10 +46,10 @@ void PerformanceCounterDescriptor::pack_counter(const PerformanceCounter &c,
   case PerformanceCounterType::OPS:
   case PerformanceCounterType::WRITE_OPS:
   case PerformanceCounterType::READ_OPS:
-    break;
   case PerformanceCounterType::BYTES:
   case PerformanceCounterType::WRITE_BYTES:
   case PerformanceCounterType::READ_BYTES:
+    break;
   case PerformanceCounterType::LATENCY:
   case PerformanceCounterType::WRITE_LATENCY:
   case PerformanceCounterType::READ_LATENCY:
@@ -68,10 +68,10 @@ void PerformanceCounterDescriptor::unpack_counter(
   case PerformanceCounterType::OPS:
   case PerformanceCounterType::WRITE_OPS:
   case PerformanceCounterType::READ_OPS:
-    break;
   case PerformanceCounterType::BYTES:
   case PerformanceCounterType::WRITE_BYTES:
   case PerformanceCounterType::READ_BYTES:
+    break;
   case PerformanceCounterType::LATENCY:
   case PerformanceCounterType::WRITE_LATENCY:
   case PerformanceCounterType::READ_LATENCY:
index 694632c01eb5a188bb95be14e70174c1a59540d8..e88b21c9dd04edfbc7556cc81209e8fcb6640881 100644 (file)
@@ -78,18 +78,15 @@ public:
             return;
           case PerformanceCounterType::BYTES:
             c->first += inb + outb;
-            c->second++;
             return;
           case PerformanceCounterType::WRITE_BYTES:
             if (op.may_write() || op.may_cache()) {
               c->first += inb;
-              c->second++;
             }
             return;
           case PerformanceCounterType::READ_BYTES:
             if (op.may_read()) {
               c->first += outb;
-              c->second++;
             }
             return;
           case PerformanceCounterType::LATENCY:
index ef6c08492db4f598abd5ea798c406e74b8f4f219..7fb03580a24a5f425e3525d9beb114376db962fb 100644 (file)
@@ -179,9 +179,9 @@ class Module(MgrModule):
                                'desc' : 'RBD image writes count'},
                 'read_ops' : {'type' : self.PERFCOUNTER_COUNTER,
                               'desc' : 'RBD image reads count'},
-                'write_bytes' : {'type' : self.PERFCOUNTER_LONGRUNAVG,
+                'write_bytes' : {'type' : self.PERFCOUNTER_COUNTER,
                                  'desc' : 'RBD image bytes written'},
-                'read_bytes' : {'type' : self.PERFCOUNTER_LONGRUNAVG,
+                'read_bytes' : {'type' : self.PERFCOUNTER_COUNTER,
                                 'desc' : 'RBD image bytes read'},
                 'write_latency' : {'type' : self.PERFCOUNTER_LONGRUNAVG,
                                    'desc' : 'RBD image writes latency (msec)'},