diff --git a/src/mgr/OSDPerfMetricTypes.cc b/src/mgr/OSDPerfMetricTypes.cc index 3d842edc163..06f7081d9aa 100644 --- a/src/mgr/OSDPerfMetricTypes.cc +++ b/src/mgr/OSDPerfMetricTypes.cc @@ -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: diff --git a/src/osd/DynamicPerfStats.h b/src/osd/DynamicPerfStats.h index 694632c01eb..e88b21c9dd0 100644 --- a/src/osd/DynamicPerfStats.h +++ b/src/osd/DynamicPerfStats.h @@ -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: diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index 50eb1debf87..5487849e157 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -182,9 +182,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)'},