From 10ab4f8b6821e2d6593bc09161c23a9163b93611 Mon Sep 17 00:00:00 2001 From: John Spray Date: Tue, 12 Sep 2017 05:42:23 -0400 Subject: [PATCH] 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) --- src/pybind/mgr/mgr_module.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/pybind/mgr/mgr_module.py b/src/pybind/mgr/mgr_module.py index cce9826dee679..f8ad75e961cde 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 -- 2.39.5