Rosetta
|
#include <basic/prof.fwd.hh>
#include <basic/Tracer.fwd.hh>
#include <time.h>
#include <basic/options/keys/run.OptionKeys.gen.hh>
#include <basic/options/option.hh>
#include <string>
#include <utility/options/BooleanOption.hh>
#include <utility/vector1.hh>
#include <utility/vectorL.hh>
Classes | |
class | basic::ProfileThis |
class | basic::DynamicProfileThis |
Namespaces | |
basic | |
Tags used to tag messeges sent by MPI functions used to decide whether a slave is requesting a new job id or flagging as job as being a bad input. | |
Macros | |
#define | PROF_START(expr) ( prof_start_function_body( expr) ) |
#define | PROF_STOP(expr) ( prof_stop_function_body( expr ) ) |
Functions | |
void | basic::prof_start_function_body (ProfTag const tag) |
void | basic::prof_stop_function_body (ProfTag const tag) |
void | basic::prof_reset () |
void | basic::prof_show () |
void | basic::show_time (basic::Tracer &tr, std::string const &msg) |
Variables | |
double const | basic::clock_factor |
clock_t const | basic::SHRINK_FACTOR |
bool | basic::show_time_on_cerr |
print "TIME_STAMP: Www Mmm dd hh:mm:ss yyyy msg" on tr.Error and on std::cerr (if boolean is true) More... | |
#define PROF_START | ( | expr | ) | ( prof_start_function_body( expr) ) |
not intended for profiling inside tight loops the clock() routine currently being used has fairly crappy resolution and it will introduce some small overhead with the function calls and the if-check even if not using -profile on the command line
you can wrap it around large-ish chunks of code, like fullatom_energy or rotamer_trials...
A simple setup for timing code fragments. Probably not optimal timing functions – I'm open to suggestions.
looks like (see eg fullatom_energy or scorefxn)
<function call>
where TAG is in the enum "Prof_tag" below (feel free to add new ones) also add to tag2string if you want friendly output.
PROF_STOP checks the time and increments the total time assigned to TAG
– miscellaneous simulation –
The final call to prof::show() will display the time usage measured by all the PROF_* calls between reset() and show()
#define PROF_STOP | ( | expr | ) | ( prof_stop_function_body( expr ) ) |