Namespaces | |
detail | |
dotgraph | |
Classes | |
class | Node |
A node in a parameter tree storing a Counter object aliased by a name. More... | |
class | Profiler |
Instrumental profiler for timing sections of code. More... | |
class | Timer |
Measures cpu or wall time. Can be constructed as a dummy that is always stopped. More... | |
class | Counter |
Resource counter used for storing operation count, call count, timing information. More... | |
struct | NodePathError |
struct | WeakSingleton |
Implements the mechanism for the weak singleton pattern. More... | |
Enumerations | |
enum class | SortBy { wall , cpu , calls , operations , none } |
Functions | |
void | report (const std::shared_ptr< Node< Counter >> &root, const std::string &description, std::ostream &out, bool cumulative=true, SortBy sort_by=SortBy::wall) |
Reports the content of a Profiler call subtree. More... | |
void | report (const Profiler &prof, std::ostream &out, bool cumulative=true, SortBy sort_by=SortBy::wall) |
Reports content of Profiler. More... | |
void | report (const Profiler &prof, std::ostream &out, MPI_Comm communicator, bool cumulative=true, SortBy sort_by=SortBy::wall) |
void | report_root_process (const Profiler &prof, std::ostream &out, MPI_Comm communicator, int root_process, bool cumulative=true, SortBy sort_by=SortBy::wall) |
Reports collective content of Profiler but writing on the root process only. More... | |
std::string | get_dotgraph (const Profiler &prof, MPI_Comm communicator, int root_process, int *hot, int *cool, double threshold, bool get_percentage_time) |
std::string | get_dotgraph (const Profiler &prof, int hot[3], int cool[3], double threshold, bool get_percentage_time) |
std::ostream & | operator<< (std::ostream &os, const Profiler &obj) |
Variables | |
std::shared_ptr< Profiler > | s_saver |
|
strong |
std::string molpro::profiler::get_dotgraph | ( | const Profiler & | prof, |
int | hot[3], | ||
int | cool[3], | ||
double | threshold, | ||
bool | get_percentage_time | ||
) |
std::string molpro::profiler::get_dotgraph | ( | const Profiler & | prof, |
MPI_Comm | communicator, | ||
int | root_process, | ||
int * | hot, | ||
int * | cool, | ||
double | threshold, | ||
bool | get_percentage_time | ||
) |
std::ostream& molpro::profiler::operator<< | ( | std::ostream & | os, |
const Profiler & | obj | ||
) |
void molpro::profiler::report | ( | const Profiler & | prof, |
std::ostream & | out, | ||
bool | cumulative = true , |
||
SortBy | sort_by = SortBy::wall |
||
) |
Reports content of Profiler.
prof | profiler to analyse and write |
out | output stream to write to |
sort_by | what parameter to use for sorting. Sorting is done on the same level only. |
cumulative | whether cumulative timings should be used or only time spend by the node and not its children |
void molpro::profiler::report | ( | const Profiler & | prof, |
std::ostream & | out, | ||
MPI_Comm | communicator, | ||
bool | cumulative = true , |
||
SortBy | sort_by = SortBy::wall |
||
) |
void molpro::profiler::report | ( | const std::shared_ptr< Node< Counter >> & | root, |
const std::string & | description, | ||
std::ostream & | out, | ||
bool | cumulative = true , |
||
SortBy | sort_by = SortBy::wall |
||
) |
Reports the content of a Profiler call subtree.
In case only part of the call tree needs to be reported. You can use Node<Counter>::find_parent, Node<Counter::walk, Node<Counter::child and Node<Counter::walk_up to navigate to the desired node.
Example usage
root | root node of the tree, can be different from Profiler::root |
description | description to use for profiler |
out | output stream to write to |
cumulative | whether cumulative timings should be used or only time spend by the node and not its children |
sort_by | what parameter to use for sorting. Sorting is done on the same level only. |
void molpro::profiler::report_root_process | ( | const Profiler & | prof, |
std::ostream & | out, | ||
MPI_Comm | communicator, | ||
int | root_process, | ||
bool | cumulative = true , |
||
SortBy | sort_by = SortBy::wall |
||
) |
Reports collective content of Profiler but writing on the root process only.
std::shared_ptr<Profiler> molpro::profiler::s_saver |