A collection of Counter objects with a name, a unit, and a description.
The class owns the counters.
If the environment variable ROOT_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 (RNTupleMetrics &&other)=default | |
| ~RNTupleMetrics ()=default | |
| 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 const std::string & | GetMetricsExportPath () |
Private Member Functions | |
| bool | Contains (const std::string &name) const |
Private Attributes | |
| std::vector< std::unique_ptr< RNTuplePerfCounter > > | fCounters |
| bool | fIsEnabled = false |
| std::string | fName |
| 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 303 of file RNTupleMetrics.hxx.
|
delete |
|
default |
|
default |
Definition at line 32 of file RNTupleMetrics.cxx.
| void ROOT::Experimental::Detail::RNTupleMetrics::Enable | ( | ) |
Definition at line 82 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 48 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 38 of file RNTupleMetrics.cxx.
|
static |
Definition at line 96 of file RNTupleMetrics.cxx.
|
inline |
Definition at line 339 of file RNTupleMetrics.hxx.
|
inline |
Definition at line 317 of file RNTupleMetrics.hxx.
| void ROOT::Experimental::Detail::RNTupleMetrics::ObserveMetrics | ( | RNTupleMetrics & | observee | ) |
Definition at line 91 of file RNTupleMetrics.cxx.
|
delete |
|
default |
| void ROOT::Experimental::Detail::RNTupleMetrics::Print | ( | std::ostream & | output, |
| const std::string & | prefix = "" ) const |
Definition at line 67 of file RNTupleMetrics.cxx.
|
private |
Definition at line 295 of file RNTupleMetrics.hxx.
Definition at line 298 of file RNTupleMetrics.hxx.
|
private |
Definition at line 297 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.