mirror of
https://github.com/ceph/ceph
synced 2025-01-01 08:32:24 +00:00
mgr: change 'bytes' dynamic perf counters to COUNTER type
(so they are of the same type as in static perf) Signed-off-by: Mykola Golub <mgolub@suse.com>
This commit is contained in:
parent
5dfcb551ff
commit
bf5435409f
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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)'},
|
||||
|
Loading…
Reference in New Issue
Block a user