|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef AthenaMonitoringKernel_MonitoredTimer_h
6 #define AthenaMonitoringKernel_MonitoredTimer_h
10 #include <string_view>
31 template<
typename unit=std::chrono::microseconds>
43 virtual double get(
size_t)
const override {
return double(*
this); }
44 virtual std::string
getString([[maybe_unused]]
size_t i)
const override {
return {}; }
46 virtual size_t size()
const override {
return 1; }
58 template<
typename unit>
63 template<
typename unit>
66 template<
typename unit>
69 template<
typename unit>
71 clock_type::time_point stopTime = m_stopTime;
72 if (stopTime == clock_type::time_point())
74 auto d = std::chrono::duration_cast<unit>(stopTime - m_startTime);
void checkNamingConvention(std::string_view name)
clock_type::time_point m_stopTime
virtual double get(size_t) const override
virtual std::string getString([[maybe_unused]] size_t i) const override
std::chrono::high_resolution_clock clock_type
def timer(name, disabled=False)
Timer(Timer const &)=delete
Generic monitoring tool for athena components.
Timer & operator=(Timer const &)=delete
virtual size_t size() const override
gives size of vector representation
const std::string & name() const
Helper class to create a scoped timer.
virtual bool hasStringRepresentation() const override
indcates that the stored content can be converted to strings
clock_type::time_point m_startTime