39 if (
c->GetName() ==
name)
48 std::string prefix =
fName +
".";
49 if (
name.compare(0, prefix.length(), std::string_view(prefix)) != 0)
52 auto innerName =
name.substr(prefix.length());
57 auto counter =
m->GetCounter(innerName);
58 if (counter !=
nullptr)
68 output <<
fName <<
" metrics disabled!" << std::endl;
76 c->Print(output, prefix +
fName +
".");
const RNTuplePerfCounter * GetCounter(std::string_view name) const
Searches this object and all the observed sub metrics.
void ObserveMetrics(RNTupleMetrics &observee)
const RNTuplePerfCounter * GetLocalCounter(std::string_view name) const
Searches counters registered in this object only. Returns nullptr if name is not found.
std::vector< std::unique_ptr< RNTuplePerfCounter > > fCounters
bool Contains(const std::string &name) const
RNTupleMetrics(const std::string &name)
std::vector< RNTupleMetrics * > fObservedMetrics
void Print(std::ostream &output, const std::string &prefix="") const
static constexpr char kNamespaceSeperator
Symbol to split metrics name from counter / sub metrics name.
A performance counter with a name and a unit, which can be activated on demand.
virtual std::string GetValueAsString() const =0
static constexpr char kFieldSeperator
Symbol to split name, unit, description, and value when printing.
std::string ToString() const
virtual ~RNTuplePerfCounter()