]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: define perf counter constants in mgr_module
authorJohn Spray <john.spray@redhat.com>
Tue, 12 Sep 2017 09:42:23 +0000 (05:42 -0400)
committerJohn Spray <john.spray@redhat.com>
Wed, 1 Nov 2017 23:03:24 +0000 (23:03 +0000)
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 <john.spray@redhat.com>
(cherry picked from commit 39ab28ed47e869e1466cb3a316a2cb11bdedd23a)

src/pybind/mgr/mgr_module.py

index cce9826dee6793e650dec0ffad897c9414af9779..f8ad75e961cdeae4957dd3c287a4cc843db4c4f7 100644 (file)
@@ -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