![]() |
QMCPACK
|
Timer accumulates time and call counts. More...
Public Member Functions | |
void | start () |
void | stop () |
std::map< StackKey, double > & | get_per_stack_total_time () |
StackKey & | get_stack_key () |
double | get_total () const |
long | get_num_calls () const |
double | get_total (const StackKey &key) |
long | get_num_calls (const StackKey &key) |
timer_id_t | get_id () const |
void | set_id (timer_id_t id) |
std::string | get_name () const |
void | reset () |
TimerType (const std::string &myname, TimerManager< TimerType< CLOCK >> *mymanager, timer_levels mytimer=timer_level_fine) | |
TimerType (const TimerType &o)=delete | |
void | set_name (const std::string &myname) |
void | set_active (const bool &is_active) |
void | set_active_by_timer_threshold (const timer_levels threshold) |
Protected Attributes | |
CLOCK::time_point | start_time |
start time of the current measurement More... | |
double | total_time |
total time accumulated of all the calls More... | |
long | num_calls |
total call counts More... | |
std::string | name |
name of this timer More... | |
bool | active |
if false, timer start/stop becomes no-op. More... | |
timer_levels | timer_level |
timer level More... | |
timer_id_t | timer_id |
timer id in registered in the manager More... | |
TimerManager< TimerType< CLOCK > > * | manager |
timer manager which allocated this timer object. nullptr if USE_STACK_TIMERS is not used. More... | |
StackKey | current_stack_key |
stack key of the current measurement More... | |
std::map< StackKey, double > | per_stack_total_time |
total time accumulated per stack key More... | |
std::map< StackKey, long > | per_stack_num_calls |
total call counts per stack key More... | |
Friends | |
template<class CLOCK1 > | |
void | set_total_time (TimerType< CLOCK1 > *timer, double total_time_input) |
template<class CLOCK1 > | |
void | set_num_calls (TimerType< CLOCK1 > *timer, long num_calls_input) |
Timer accumulates time and call counts.
CLOCK | can be a std::chrono clock or FakeChronoClock |
Definition at line 135 of file NewTimer.h.
|
inline |
Definition at line 198 of file NewTimer.h.
|
inline |
Definition at line 186 of file NewTimer.h.
References TimerType< CLOCK >::timer_id.
|
inline |
|
inline |
Definition at line 179 of file NewTimer.h.
References TimerType< CLOCK >::num_calls.
Referenced by qmcplusplus::TEST_CASE().
|
inline |
Definition at line 183 of file NewTimer.h.
References TimerType< CLOCK >::per_stack_num_calls.
|
inline |
Definition at line 172 of file NewTimer.h.
References TimerType< CLOCK >::per_stack_total_time.
|
inline |
Definition at line 174 of file NewTimer.h.
References TimerType< CLOCK >::current_stack_key.
|
inline |
Definition at line 178 of file NewTimer.h.
References TimerType< CLOCK >::total_time.
Referenced by qmcplusplus::TEST_CASE().
|
inline |
Definition at line 182 of file NewTimer.h.
References TimerType< CLOCK >::per_stack_total_time.
|
inline |
Definition at line 192 of file NewTimer.h.
References TimerType< CLOCK >::num_calls, and TimerType< CLOCK >::total_time.
|
inline |
Definition at line 222 of file NewTimer.h.
References TimerType< CLOCK >::active.
void set_active_by_timer_threshold | ( | const timer_levels | threshold | ) |
Definition at line 124 of file NewTimer.cpp.
|
inline |
Definition at line 188 of file NewTimer.h.
References TimerType< CLOCK >::timer_id.
|
inline |
void start | ( | ) |
Definition at line 30 of file NewTimer.cpp.
Referenced by DiracDeterminantWithBackflow::acceptMove(), SOVMCUpdatePbyP::advanceWalker(), VMCUpdatePbyP::advanceWalker(), VMCBatched::advanceWalkers(), DMCBatched::advanceWalkers(), RMCUpdatePbyPWithDrift::advanceWalkersRMC(), RMCUpdatePbyPWithDrift::advanceWalkersVMC(), DiracDeterminantWithBackflow::dummyEvalLi(), DiracDeterminantWithBackflow::evaluateDerivatives(), DiracDeterminantWithBackflow::evaluateLog(), QMCMain::execute(), QMCFixedSampleLinearOptimizeBatched::previous_linear_methods_run(), DiracDeterminantWithBackflow::ratio(), DiracDeterminantWithBackflow::ratioGrad(), QMCFixedSampleLinearOptimize::run(), qmcplusplus::TEST_CASE(), DiracDeterminantWithBackflow::testDerivFjj(), DiracDeterminantWithBackflow::testL(), and DiracDeterminantWithBackflow::updateBuffer().
void stop | ( | ) |
Definition at line 33 of file NewTimer.cpp.
Referenced by DiracDeterminantWithBackflow::acceptMove(), SOVMCUpdatePbyP::advanceWalker(), VMCUpdatePbyP::advanceWalker(), VMCBatched::advanceWalkers(), DMCBatched::advanceWalkers(), RMCUpdatePbyPWithDrift::advanceWalkersRMC(), RMCUpdatePbyPWithDrift::advanceWalkersVMC(), DiracDeterminantWithBackflow::dummyEvalLi(), DiracDeterminantWithBackflow::evaluateDerivatives(), DiracDeterminantWithBackflow::evaluateLog(), QMCMain::execute(), QMCFixedSampleLinearOptimizeBatched::previous_linear_methods_run(), DiracDeterminantWithBackflow::ratio(), DiracDeterminantWithBackflow::ratioGrad(), QMCFixedSampleLinearOptimize::run(), qmcplusplus::TEST_CASE(), DiracDeterminantWithBackflow::testDerivFjj(), DiracDeterminantWithBackflow::testL(), and DiracDeterminantWithBackflow::updateBuffer().
|
friend |
|
friend |
|
protected |
if false, timer start/stop becomes no-op.
Definition at line 147 of file NewTimer.h.
Referenced by TimerType< CLOCK >::set_active().
|
protected |
stack key of the current measurement
Definition at line 156 of file NewTimer.h.
Referenced by TimerType< CLOCK >::get_stack_key().
|
protected |
timer manager which allocated this timer object. nullptr if USE_STACK_TIMERS is not used.
Definition at line 153 of file NewTimer.h.
|
protected |
name of this timer
Definition at line 145 of file NewTimer.h.
Referenced by TimerType< CLOCK >::get_name(), and TimerType< CLOCK >::set_name().
|
protected |
total call counts
Definition at line 143 of file NewTimer.h.
Referenced by TimerType< CLOCK >::get_num_calls(), TimerType< CLOCK >::reset(), and qmcplusplus::set_num_calls().
|
protected |
total call counts per stack key
Definition at line 161 of file NewTimer.h.
Referenced by TimerType< CLOCK >::get_num_calls().
|
protected |
total time accumulated per stack key
Definition at line 159 of file NewTimer.h.
Referenced by TimerType< CLOCK >::get_per_stack_total_time(), and TimerType< CLOCK >::get_total().
|
protected |
start time of the current measurement
Definition at line 139 of file NewTimer.h.
|
protected |
timer id in registered in the manager
Definition at line 151 of file NewTimer.h.
Referenced by TimerType< CLOCK >::get_id(), and TimerType< CLOCK >::set_id().
|
protected |
timer level
Definition at line 149 of file NewTimer.h.
|
protected |
total time accumulated of all the calls
Definition at line 141 of file NewTimer.h.
Referenced by TimerType< CLOCK >::get_total(), TimerType< CLOCK >::reset(), and qmcplusplus::set_total_time().