![]() |
QMCPACK
|
Manager creates timers and handle reports. More...
Inheritance diagram for TimerManager< TIMER >:
Collaboration diagram for TimerManager< TIMER >:Classes | |
| struct | FlatProfileData |
| struct | StackProfileData |
Public Types | |
| using | nameList_t = std::map< std::string, int > |
| using | timeList_t = std::vector< double > |
| using | callList_t = std::vector< long > |
| using | names_t = std::vector< std::string > |
Public Member Functions | |
| TimerManager () | |
| TIMER * | createTimer (const std::string &myname, timer_levels mytimer=timer_level_fine) |
| Create a new timer object registred in this manager. This call is thread-safe. More... | |
| void | push_timer (TIMER *t) |
| void | pop_timer (TIMER *t) |
| TIMER * | current_timer () |
| void | set_timer_threshold (const timer_levels threshold) |
| void | set_timer_threshold (const std::string &threshold) |
| std::string | get_timer_threshold_string () const |
| bool | maximum_number_of_timers_exceeded () const |
| void | reset () |
| void | print (Communicate *comm) |
| void | collate_flat_profile (Communicate *comm, FlatProfileData &p) |
| void | collate_stack_profile (Communicate *comm, StackProfileData &p) |
| void | output_timing (Communicate *comm, Libxml2Document &doc, xmlNodePtr root) |
| void | get_stack_name_from_id (const StackKey &key, std::string &name) |
Private Member Functions | |
| void | initializeTimer (TIMER &t) |
| void | print_flat (Communicate *comm) |
| void | print_stack (Communicate *comm) |
Private Attributes | |
| std::vector< std::unique_ptr< TIMER > > | timer_storage_ |
| All the timers created by this manager. More... | |
| std::mutex | timer_list_lock_ |
| mutex for TimerList More... | |
| std::vector< TIMER * > | CurrentTimerStack |
| The stack of nested active timers. More... | |
| timer_levels | timer_threshold |
| The threshold for active timers. More... | |
| timer_id_t | max_timer_id |
| The current maximal timer id. More... | |
| bool | max_timers_exceeded |
| status of maxmal timer id reached More... | |
| std::map< timer_id_t, std::string > | timer_id_name |
| timer id to name mapping More... | |
| std::map< std::string, timer_id_t > | timer_name_to_id |
| name to timer id mapping More... | |
Manager creates timers and handle reports.
| TIMER | regular or fake timer |
TimerManager is generally not thread-safe. Thread-safe functions are noted below.
Definition at line 40 of file NewTimer.h.
| struct qmcplusplus::TimerManager::FlatProfileData |
Definition at line 113 of file TimerManager.h.
Collaboration diagram for TimerManager< TIMER >::FlatProfileData:| Class Members | ||
|---|---|---|
| callList_t | callList | |
| nameList_t | nameList | |
| timeList_t | timeList | |
| struct qmcplusplus::TimerManager::StackProfileData |
Definition at line 120 of file TimerManager.h.
Collaboration diagram for TimerManager< TIMER >::StackProfileData:| Class Members | ||
|---|---|---|
| callList_t | callList | |
| nameList_t | nameList | |
| names_t | names | |
| timeList_t | timeExclList | |
| timeList_t | timeList | |
| using callList_t = std::vector<long> |
Definition at line 110 of file TimerManager.h.
| using nameList_t = std::map<std::string, int> |
Definition at line 108 of file TimerManager.h.
| using names_t = std::vector<std::string> |
Definition at line 111 of file TimerManager.h.
| using timeList_t = std::vector<double> |
Definition at line 109 of file TimerManager.h.
|
inline |
Definition at line 76 of file TimerManager.h.
| void collate_flat_profile | ( | Communicate * | comm, |
| FlatProfileData & | p | ||
| ) |
Definition at line 168 of file TimerManager.cpp.
Referenced by qmcplusplus::TEST_CASE().
| void collate_stack_profile | ( | Communicate * | comm, |
| StackProfileData & | p | ||
| ) |
Definition at line 244 of file TimerManager.cpp.
Referenced by qmcplusplus::TEST_CASE().
| TIMER * createTimer | ( | const std::string & | myname, |
| timer_levels | mytimer = timer_level_fine |
||
| ) |
Create a new timer object registred in this manager. This call is thread-safe.
Definition at line 84 of file TimerManager.cpp.
Referenced by qmcplusplus::TEST_CASE().
|
inline |
Definition at line 90 of file TimerManager.h.
Referenced by qmcplusplus::TEST_CASE().
| void get_stack_name_from_id | ( | const StackKey & | key, |
| std::string & | name | ||
| ) |
Definition at line 229 of file TimerManager.cpp.
| std::string get_timer_threshold_string | ( | ) | const |
Definition at line 161 of file TimerManager.cpp.
|
private |
Definition at line 57 of file TimerManager.cpp.
|
inline |
Definition at line 103 of file TimerManager.h.
| void output_timing | ( | Communicate * | comm, |
| Libxml2Document & | doc, | ||
| xmlNodePtr | root | ||
| ) |
Definition at line 419 of file TimerManager.cpp.
Referenced by qmcplusplus::TEST_CASE().
| void pop_timer | ( | TIMER * | t | ) |
Definition at line 113 of file TimerManager.cpp.
| void print | ( | Communicate * | comm | ) |
Definition at line 298 of file TimerManager.cpp.
|
private |
Definition at line 319 of file TimerManager.cpp.
|
private |
Definition at line 360 of file TimerManager.cpp.
| void push_timer | ( | TIMER * | t | ) |
Definition at line 97 of file TimerManager.cpp.
| void reset | ( | ) |
Definition at line 133 of file TimerManager.cpp.
| void set_timer_threshold | ( | const timer_levels | threshold | ) |
Definition at line 140 of file TimerManager.cpp.
Referenced by qmcplusplus::TEST_CASE().
| void set_timer_threshold | ( | const std::string & | threshold | ) |
Definition at line 148 of file TimerManager.cpp.
|
private |
The stack of nested active timers.
Definition at line 54 of file TimerManager.h.
Referenced by TimerManager< qmcplusplus::TimerType< CLOCK > >::current_timer().
|
private |
The current maximal timer id.
Definition at line 58 of file TimerManager.h.
|
private |
status of maxmal timer id reached
Definition at line 60 of file TimerManager.h.
Referenced by TimerManager< qmcplusplus::TimerType< CLOCK > >::maximum_number_of_timers_exceeded().
|
private |
timer id to name mapping
Definition at line 62 of file TimerManager.h.
|
private |
mutex for TimerList
Definition at line 52 of file TimerManager.h.
|
private |
name to timer id mapping
Definition at line 64 of file TimerManager.h.
|
private |
All the timers created by this manager.
Definition at line 50 of file TimerManager.h.
|
private |
The threshold for active timers.
Definition at line 56 of file TimerManager.h.