From: John Spray Date: Tue, 12 Sep 2017 09:42:23 +0000 (-0400) Subject: mgr: define perf counter constants in mgr_module X-Git-Tag: v12.2.2~61^2~63 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=10ab4f8b6821e2d6593bc09161c23a9163b93611;p=ceph.git mgr: define perf counter constants in mgr_module So that modules can consume perf counter data intelligently without having to hunt around in C land for these constants and redefine them. Signed-off-by: John Spray (cherry picked from commit 39ab28ed47e869e1466cb3a316a2cb11bdedd23a) --- diff --git a/src/pybind/mgr/mgr_module.py b/src/pybind/mgr/mgr_module.py index cce9826dee67..f8ad75e961cd 100644 --- a/src/pybind/mgr/mgr_module.py +++ b/src/pybind/mgr/mgr_module.py @@ -16,6 +16,17 @@ PRIO_USEFUL = 5 PRIO_UNINTERESTING = 2 PRIO_DEBUGONLY = 0 +# counter value types +PERFCOUNTER_TIME = 1 +PERFCOUNTER_U64 = 2 + +# counter types +PERFCOUNTER_LONGRUNAVG = 4 +PERFCOUNTER_COUNTER = 8 +PERFCOUNTER_HISTOGRAM = 0x10 +PERFCOUNTER_TYPE_MASK = ~2 + + class CommandResult(object): """ Use with MgrModule.send_command