ExaDG
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ExaDG::TimerTree Class Reference

Public Member Functions

 TimerTree ()
 
void clear ()
 
void insert (std::vector< std::string > const ids, double const wall_time)
 
void insert (std::vector< std::string > ids, std::shared_ptr< TimerTree > sub_tree, std::string const new_name="")
 
void print_plain (dealii::ConditionalOStream const &pcout) const
 
void print_level (dealii::ConditionalOStream const &pcout, unsigned int const level) const
 
unsigned int get_max_level () const
 

Constructor & Destructor Documentation

◆ TimerTree()

ExaDG::TimerTree::TimerTree ( )

Constructor. Initializes ID with an empty string.

Member Function Documentation

◆ clear()

void ExaDG::TimerTree::clear ( )

This function clears the content of this tree. Sub trees inserted into this tree via pointers to external trees are not touched.

◆ get_max_level()

unsigned int ExaDG::TimerTree::get_max_level ( ) const

Returns the maximum number of levels of the timer tree.

◆ insert() [1/2]

void ExaDG::TimerTree::insert ( std::vector< std::string > const ids,
double const wall_time )

This function inserts a measured wall_time into the tree, by either creating a new entry in the tree if this function is called the first time with this ID, or by adding the wall_time to an entry already existing in the tree.

◆ insert() [2/2]

void ExaDG::TimerTree::insert ( std::vector< std::string > ids,
std::shared_ptr< TimerTree > sub_tree,
std::string const new_name = "" )

This function inserts a whole sub_tree into an existing tree, where the parameter names specifies the place at which to insert the sub_tree. This function allows to combine different timer trees in a modular way. If a non empty string new_name is provided, the id of sub_tree is replaced by new_name when inserted into the tree.

◆ print_level()

void ExaDG::TimerTree::print_level ( dealii::ConditionalOStream const & pcout,
unsigned int const level ) const

This is the actual function of interest of this class, i.e., an analysis of wall times with a hierarchical formatting of results. Relative wall times are printed for all children of a sub-tree if a wall time has been set for the parent of these children. In this case, an additional item other is created in order to give insights to which extent the code has been covered with timers and to which extend time is spent is other code paths that are currently not covered by timers.

◆ print_plain()

void ExaDG::TimerTree::print_plain ( dealii::ConditionalOStream const & pcout) const

Prints wall time of all items of a tree without an analysis of the relative share of the children.


The documentation for this class was generated from the following files: