Merge pull request #20742 from votdev/perf_counter_units

mgr/dashboard v2: Add units to performance counters
This commit is contained in:
Volker Theile 2018-03-07 08:41:27 +01:00 committed by GitHub
commit b96dfb5b84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,7 @@ class PerfCounter(RESTController):
if mgr._stattype_to_str(value['type']) == 'counter':
counter['value'] = self._get_rate(
self._service_type, service_id, key)
counter['unit'] = '/s'
counter['unit'] = mgr._unit_to_str(value['units'])
else:
counter['value'] = self._get_latest(
self._service_type, service_id, key)