#include <MsqTimer.hpp>
Public Types | |
typedef size_t | Key |
typedef size_t | Key |
Public Member Functions | |
StopWatchCollection () | |
Key | add (const msq_std::string &name, bool fail_if_exists=true) |
Key | get_key (const msq_std::string &name) const |
msq_std::string | get_string (const Key key) |
Gets the string associated with a key. More... | |
void | get_string (const Key key, msq_std::string &new_string) |
Gets the string associated with a key. More... | |
void | remove (const Key key) |
void | remove (const msq_std::string &name) |
void | start (const Key key) |
void | start (const msq_std::string &name) |
void | stop (const Key key) |
void | stop (const msq_std::string &name) |
void | reset (const Key key) |
void | reset (const msq_std::string &name) |
double | total_time (const Key key) const |
double | total_time (const msq_std::string &name) const |
int | number_of_starts (const Key key) const |
int | number_of_starts (const msq_std::string &name) const |
int | number_of_stop_watches () |
void | get_keys_sorted_by_time (msq_std::vector< Key > &sorted_keys) |
StopWatchCollection () | |
Key | add (const msq_std::string &name, bool fail_if_exists=true) |
Key | get_key (const msq_std::string &name) const |
msq_std::string | get_string (const Key key) |
Gets the string associated with a key. More... | |
void | get_string (const Key key, msq_std::string &new_string) |
Gets the string associated with a key. More... | |
void | remove (const Key key) |
void | remove (const msq_std::string &name) |
void | start (const Key key) |
void | start (const msq_std::string &name) |
void | stop (const Key key) |
void | stop (const msq_std::string &name) |
void | reset (const Key key) |
void | reset (const msq_std::string &name) |
double | total_time (const Key key) const |
double | total_time (const msq_std::string &name) const |
int | number_of_starts (const Key key) const |
int | number_of_starts (const msq_std::string &name) const |
int | number_of_stop_watches () |
void | get_keys_sorted_by_time (msq_std::vector< Key > &sorted_keys) |
Private Attributes | |
msq_std::vector< msq_std::pair < msq_std::string, StopWatch > > | mEntries |
Definition at line 115 of file includeLinks/MsqTimer.hpp.
typedef size_t Key |
Definition at line 118 of file includeLinks/MsqTimer.hpp.
typedef size_t Key |
Definition at line 118 of file src/Misc/MsqTimer.hpp.
|
inline |
Definition at line 121 of file includeLinks/MsqTimer.hpp.
|
inline |
Definition at line 121 of file src/Misc/MsqTimer.hpp.
Mesquite::StopWatchCollection::Key add | ( | const msq_std::string & | name, |
bool | fail_if_exists = true |
||
) |
Definition at line 139 of file Misc/MsqTimer.cpp.
Key add | ( | const msq_std::string & | name, |
bool | fail_if_exists = true |
||
) |
Mesquite::StopWatchCollection::Key get_key | ( | const msq_std::string & | name | ) | const |
Definition at line 178 of file Misc/MsqTimer.cpp.
Referenced by StopWatchCollection::number_of_starts(), StopWatchCollection::remove(), StopWatchCollection::reset(), StopWatchCollection::start(), StopWatchCollection::stop(), and StopWatchCollection::total_time().
Key get_key | ( | const msq_std::string & | name | ) | const |
void get_keys_sorted_by_time | ( | msq_std::vector< Key > & | sorted_keys | ) |
Fills a vector of StopWatchCollection::Key in which the Keys are ordered by the associated StopWatch's total_time. The key associated with the largest total_time StopWatch is in the first position of the vector. The key associated with the smallest total_time StopWatch is in the last position of the vector.
Definition at line 269 of file Misc/MsqTimer.cpp.
References i.
Referenced by Mesquite::operator<<().
void get_keys_sorted_by_time | ( | msq_std::vector< Key > & | sorted_keys | ) |
|
inline |
Gets the string associated with a key.
Definition at line 137 of file src/Misc/MsqTimer.hpp.
References StopWatchCollection::mEntries.
|
inline |
Gets the string associated with a key.
Definition at line 137 of file includeLinks/MsqTimer.hpp.
References StopWatchCollection::mEntries.
Referenced by Mesquite::operator<<().
|
inline |
Gets the string associated with a key.
Definition at line 140 of file includeLinks/MsqTimer.hpp.
References StopWatchCollection::mEntries.
|
inline |
Gets the string associated with a key.
Definition at line 140 of file src/Misc/MsqTimer.hpp.
References StopWatchCollection::mEntries.
int number_of_starts | ( | const Key | key | ) | const |
int number_of_starts | ( | const Key | key | ) | const |
Definition at line 254 of file Misc/MsqTimer.cpp.
Referenced by StopWatchCollection::number_of_starts(), and Mesquite::operator<<().
|
inline |
Definition at line 170 of file includeLinks/MsqTimer.hpp.
References StopWatchCollection::get_key(), and StopWatchCollection::number_of_starts().
|
inline |
Definition at line 170 of file src/Misc/MsqTimer.hpp.
References StopWatchCollection::get_key(), and StopWatchCollection::number_of_starts().
|
inline |
Definition at line 174 of file includeLinks/MsqTimer.hpp.
References StopWatchCollection::mEntries.
|
inline |
Definition at line 174 of file src/Misc/MsqTimer.hpp.
References StopWatchCollection::mEntries.
void remove | ( | const Key | key | ) |
Definition at line 195 of file Misc/MsqTimer.cpp.
void remove | ( | const Key | key | ) |
|
inline |
Definition at line 145 of file includeLinks/MsqTimer.hpp.
References StopWatchCollection::get_key().
|
inline |
Definition at line 145 of file src/Misc/MsqTimer.hpp.
References StopWatchCollection::get_key().
void reset | ( | const Key | key | ) |
Definition at line 234 of file Misc/MsqTimer.cpp.
Referenced by StopWatchCollection::reset().
void reset | ( | const Key | key | ) |
|
inline |
Definition at line 160 of file includeLinks/MsqTimer.hpp.
References StopWatchCollection::get_key(), and StopWatchCollection::reset().
|
inline |
Definition at line 160 of file src/Misc/MsqTimer.hpp.
References StopWatchCollection::get_key(), and StopWatchCollection::reset().
void start | ( | const Key | key | ) |
void start | ( | const Key | key | ) |
Definition at line 216 of file Misc/MsqTimer.cpp.
Referenced by StopWatchCollection::start(), and FunctionTimer::start().
|
inline |
Definition at line 150 of file includeLinks/MsqTimer.hpp.
References StopWatchCollection::get_key(), and StopWatchCollection::start().
|
inline |
Definition at line 150 of file src/Misc/MsqTimer.hpp.
References StopWatchCollection::get_key(), and StopWatchCollection::start().
void stop | ( | const Key | key | ) |
void stop | ( | const Key | key | ) |
Definition at line 225 of file Misc/MsqTimer.cpp.
Referenced by StopWatchCollection::stop(), and FunctionTimer::~FunctionTimer().
|
inline |
Definition at line 155 of file src/Misc/MsqTimer.hpp.
References StopWatchCollection::get_key(), and StopWatchCollection::stop().
|
inline |
Definition at line 155 of file includeLinks/MsqTimer.hpp.
References StopWatchCollection::get_key(), and StopWatchCollection::stop().
double total_time | ( | const Key | key | ) | const |
double total_time | ( | const Key | key | ) | const |
Definition at line 243 of file Misc/MsqTimer.cpp.
Referenced by Mesquite::operator<<(), and StopWatchCollection::total_time().
|
inline |
Definition at line 166 of file includeLinks/MsqTimer.hpp.
References StopWatchCollection::get_key(), and StopWatchCollection::total_time().
|
inline |
Definition at line 166 of file src/Misc/MsqTimer.hpp.
References StopWatchCollection::get_key(), and StopWatchCollection::total_time().
|
private |
Definition at line 180 of file includeLinks/MsqTimer.hpp.
Referenced by StopWatchCollection::get_string(), and StopWatchCollection::number_of_stop_watches().