1 #define GAUDIKERNEL_CHRONOENTITY_CPP 1 21 #include "boost/format.hpp" 35 constexpr
double minute = 60 *
second;
36 constexpr
double hour = 60 * minute;
37 constexpr
double day = 24 * hour;
38 constexpr
double week = 7 * day;
39 constexpr
double month = 30 * day;
40 constexpr
double year = 365 * day;
91 return "Time User : " +
99 return "Time System : " +
106 return "TimeElapsed: " +
113 const double maximal,
const unsigned long number )
const 128 long double unit = std::get<1>( *i );
129 fmt % std::get<2>( *i ) % (double)( total / unit ) % number;
133 boost::format fmt1(
"Ave/Min/Max=%2$5.3g(+-%3$5.3g)/%4$5.3g/%5$5.3g%1$s" );
137 unit = std::get<1>( *i );
138 fmt1 % std::get<2>( *i ) % (double)( mean / unit ) % (double)( rms / unit ) % (double)( minimal / unit ) %
139 (double)( maximal / unit );
152 return ( &e ==
this )
203 using namespace boost::io;
204 _fmt.exceptions( all_error_bits ^ ( too_many_args_bit | too_few_args_bit ) );
256 _fmt % ( stat->nEntries() )
257 % ( stat->
flag() / _unit )
std::string outputElapsedTime() const
print the chrono ;
double kMaximalTime() const
maximal measurement for kernel time
double uMinimalTime() const
minimal measurement for user time
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
IChronoSvc::ChronoStatus m_status
current status of this chrono object;
double uTotalTime() const
total user time
StatEntity m_elapsed
the actual storage of "elapsed" time
a small helper class for implementation of ChronoStatSvc service, It also could be used as some local...
TimeValueType kernelTime() const
Retrieve the kernel time in the requested unit.
double kTotalTime() const
total Kernel time
constexpr double microsecond
TimeValueType userTime() const
Retrieve the user time in the requested unit.
StatEntity m_user
the actual storage of "user" time
double uRMSTime() const
r.m.s User Time
double kMinimalTime() const
minimal measurement for kernel time
double flagMeanErr() const
double eMinimalTime() const
minimal measurement for elapsed time
double kRMSTime() const
r.m.s Kernel Time
std::string outputSystemTime() const
print the chrono ;
IChronoSvc::ChronoStatus start()
start the current chrono
ChronoEntity & operator+=(const ChronoEntity &entity)
Compound assignment operator.
std::string outputTime(IChronoSvc::ChronoType typ, const std::string &fmt, System::TimeType unit) const
print the chrono according the format and units
System::ProcessTime m_start
start stamp for current measurement of process times
System::ProcessTime m_delta
delta process times
double kMeanTime() const
average Kernel Time
double eMeanTime() const
average Elapsed Time
TimeType
Time type for conversion.
StatEntity m_kernel
the actual storage of "kernel" time
double eRMSTime() const
r.m.s Elapsed Time
double uMeanTime() const
average User Time
std::string outputUserTime() const
print the chrono ;
std::string format(const double total, const double minimal, const double mean, const double rms, const double maximal, const unsigned long number) const
format
double totalTime() const
total time
bool operator<(const ChronoEntity &entity) const
comparison operator
TimeValueType elapsedTime() const
Retrieve the elapsed time in the requested unit.
constexpr double nanosecond
GAUDI_API ProcessTime getProcessTime(long pid=-1)
Retrieve the process time data for a process.
double eMaximalTime() const
maximal measurement for elapsed time
constexpr double millisecond
static const System::TimeType TimeUnit
internal unit used for the system time conversion (microseconds)
unsigned long nOfMeasurements() const
number of chrono measurements
backward compatible StatEntity class.
IChronoSvc::ChronoStatus stop()
stop the chrono
double uMaximalTime() const
maximal measurement for user time
double eTotalTime() const
total Elapsed time