A collection of Counter objects with a name, a unit, and a description.
The class owns the counters.
If the environment variable ROOT_EXPERIMENTAL_EXPORT_RNTUPLE_METRICS is set, metrics are automatically enabled on construction, and any counter added afterwards through MakeCounter() is enabled as well.
Definition at line 290 of file RNTupleMetrics.hxx.
Public Member Functions | |
| RNTupleMetrics (const RNTupleMetrics &other)=delete | |
| RNTupleMetrics (const std::string &name) | |
| RNTupleMetrics (const std::string &name, const std::string &ntupleName) | |
| RNTupleMetrics (RNTupleMetrics &&other)=default | |
| ~RNTupleMetrics () | |
| void | Enable () |
| const RNTuplePerfCounter * | GetCounter (std::string_view name) const |
| Searches this object and all the observed sub metrics. | |
| const RNTuplePerfCounter * | GetLocalCounter (std::string_view name) const |
Searches counters registered in this object only. Returns nullptr if name is not found. | |
| bool | IsEnabled () const |
| template<typename CounterPtrT , class... Args> | |
| CounterPtrT | MakeCounter (const std::string &name, Args &&... args) |
| void | ObserveMetrics (RNTupleMetrics &observee) |
| RNTupleMetrics & | operator= (const RNTupleMetrics &other)=delete |
| RNTupleMetrics & | operator= (RNTupleMetrics &&other)=default |
| void | Print (std::ostream &output, const std::string &prefix="") const |
Static Public Member Functions | |
| static std::string | GetMetricsExportPath () |
Private Member Functions | |
| void | CollectCounters (std::vector< std::pair< std::string, const RNTuplePerfCounter * > > &counters, const std::string &prefix="") const |
| Retrieves each counter of the observed metrics down to the class instances which own the counters and pairs them with their fully qualified names. | |
| bool | Contains (const std::string &name) const |
| void | ExportToRootFile () |
Private Attributes | |
| std::vector< std::unique_ptr< RNTuplePerfCounter > > | fCounters |
| std::string | fExportPath |
| bool | fIsEnabled = false |
| std::string | fName |
| std::string | fNTupleName |
| std::vector< RNTupleMetrics * > | fObservedMetrics |
Static Private Attributes | |
| static constexpr char | kNamespaceSeperator = '.' |
| Symbol to split metrics name from counter / sub metrics name. | |
#include <ROOT/RNTupleMetrics.hxx>
|
inlineexplicit |
Definition at line 311 of file RNTupleMetrics.hxx.
|
inline |
Definition at line 312 of file RNTupleMetrics.hxx.
|
delete |
|
default |
| ROOT::Experimental::Detail::RNTupleMetrics::~RNTupleMetrics | ( | ) |
Definition at line 136 of file RNTupleMetrics.cxx.
|
private |
Retrieves each counter of the observed metrics down to the class instances which own the counters and pairs them with their fully qualified names.
Definition at line 144 of file RNTupleMetrics.cxx.
Definition at line 61 of file RNTupleMetrics.cxx.
| void ROOT::Experimental::Detail::RNTupleMetrics::Enable | ( | ) |
Definition at line 111 of file RNTupleMetrics.cxx.
|
private |
Definition at line 163 of file RNTupleMetrics.cxx.
| const ROOT::Experimental::Detail::RNTuplePerfCounter * ROOT::Experimental::Detail::RNTupleMetrics::GetCounter | ( | std::string_view | name | ) | const |
Searches this object and all the observed sub metrics.
name must start with the prefix used by this RNTupleMetrics instance. Returns nullptr if name is not found.
Definition at line 77 of file RNTupleMetrics.cxx.
| const ROOT::Experimental::Detail::RNTuplePerfCounter * ROOT::Experimental::Detail::RNTupleMetrics::GetLocalCounter | ( | std::string_view | name | ) | const |
Searches counters registered in this object only. Returns nullptr if name is not found.
Definition at line 67 of file RNTupleMetrics.cxx.
|
static |
Definition at line 125 of file RNTupleMetrics.cxx.
|
inline |
Definition at line 353 of file RNTupleMetrics.hxx.
|
inline |
Definition at line 331 of file RNTupleMetrics.hxx.
| void ROOT::Experimental::Detail::RNTupleMetrics::ObserveMetrics | ( | RNTupleMetrics & | observee | ) |
Definition at line 120 of file RNTupleMetrics.cxx.
|
delete |
|
default |
| void ROOT::Experimental::Detail::RNTupleMetrics::Print | ( | std::ostream & | output, |
| const std::string & | prefix = "" ) const |
Definition at line 96 of file RNTupleMetrics.cxx.
|
private |
Definition at line 295 of file RNTupleMetrics.hxx.
|
private |
Definition at line 299 of file RNTupleMetrics.hxx.
Definition at line 300 of file RNTupleMetrics.hxx.
|
private |
Definition at line 297 of file RNTupleMetrics.hxx.
|
private |
Definition at line 298 of file RNTupleMetrics.hxx.
|
private |
Definition at line 296 of file RNTupleMetrics.hxx.
|
staticconstexprprivate |
Symbol to split metrics name from counter / sub metrics name.
Definition at line 293 of file RNTupleMetrics.hxx.