From: Adam Kupczyk Date: Wed, 4 Mar 2026 17:30:59 +0000 (+0000) Subject: doc/dev/cputrace.rst: Documentation for groups X-Git-Tag: v21.0.0~59^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=445ef4c354e87f7c94e4f04af1fbd64fed42c171;p=ceph.git doc/dev/cputrace.rst: Documentation for groups Signed-off-by: Adam Kupczyk --- diff --git a/doc/dev/cputrace.rst b/doc/dev/cputrace.rst index 2ca57bf0913b..df19a48a54c9 100644 --- a/doc/dev/cputrace.rst +++ b/doc/dev/cputrace.rst @@ -174,6 +174,27 @@ To later access the collected measurements for a given name, use: // m->dump_to_stringstream(ss, HW_PROFILE_INS|HW_PROFILE_CYC); } +Groups of measurements +---------------------- + +Keeps all measurements together. Allows to very easily add a CPU probe. +This method is limited to measuring only scopes of execution, where RAII rules can be used. + +Define your measurements group: + +.. code-block:: cpp + + cpucounter_group BlueStore::cputrace_bluestore("bluestore"); + +And put some probes: + +.. code-block:: cpp + + MEASURE_SCOPE(cputrace_bluestore, txc_state_proc) + +The values are easily available for read and reset via admin socket commands. +Unlike named measurements, probes in groups cannot be stopped and started. + Admin socket integration ------------------------