A tree structure of Stopwatch objects.
More...
#include <Stopwatch_tree.hpp>
Public Member Functions | |
| Stopwatch_tree (std::string work_unit_name_arg, std::map< std::string, Stopwatch_tree > init_children={}) | |
| std::string | report () const |
| returns a string with a human-readable summary of the timing data | |
| Stopwatch_tree & | operator[] (std::string name) |
shortcut to access the child named name | |
| Stopwatch_tree & | emplace (std::string name, std::string work_unit) |
Adds a child with specified name and work_unit_name. | |
Public Attributes | |
| Stopwatch | stopwatch |
| std::map< std::string, Stopwatch_tree > | children |
| int | work_units_completed = 0 |
| std::string | work_unit_name |
A tree structure of Stopwatch objects.
Can acquire a hierarchical breakdown of the time spent on nested tasks and display it in a human-readable format.
| Stopwatch_tree & hexed::Stopwatch_tree::emplace | ( | std::string | name, |
| std::string | work_unit ) |
Adds a child with specified name and work_unit_name.
Child must not already exist. Returns a reference to the constructed child.
| std::map<std::string, Stopwatch_tree> hexed::Stopwatch_tree::children |
children is deprecated. Prefer insertion with Stopwatch_tree::emplace and access with Stopwatch_tree::operator[].