28 void group(std::string name =
"",
int total = 0,
int level = -1);
40 void message(
const std::string&);
47 std::function<void(
const std::string&,
int,
int)>
report;
69 std::string
str()
const;
72 std::vector<Total>
totals()
const;
A single element of the nested group call stack.
Definition ProgressMonitor.hh:83
std::chrono::milliseconds started
Definition ProgressMonitor.hh:88
int step
Definition ProgressMonitor.hh:89
std::string name
Definition ProgressMonitor.hh:87
int level
Definition ProgressMonitor.hh:91
int total_steps
Definition ProgressMonitor.hh:89
std::vector< std::string > messages
Definition ProgressMonitor.hh:90
Object to accumulate total time and call counts for a particular named execution group.
Definition ProgressMonitor.hh:55
size_t call_count
Definition ProgressMonitor.hh:60
long time_spent_as_long() const
Definition ProgressMonitor.cc:118
std::string name
Definition ProgressMonitor.hh:59
std::chrono::milliseconds time_spent
Definition ProgressMonitor.hh:61
int total_steps
Definition ProgressMonitor.hh:62
Total()
Definition ProgressMonitor.cc:23
std::string str() const
Definition ProgressMonitor.cc:28
bool operator==(const Total &other) const
Definition ProgressMonitor.cc:145
std::vector< std::string > messages
Definition ProgressMonitor.hh:63
Object keeping track of time spent in nested execution blocks, and keeping track of out-of-band messa...
Definition ProgressMonitor.hh:17
virtual ~ProgressMonitor()
Definition ProgressMonitor.cc:13
std::map< std::string, Total > call_totals
Definition ProgressMonitor.hh:95
void group(std::string name="", int total=0, int level=-1)
Start a new named group, or close the innermost one in case the name argument is empty.
Definition ProgressMonitor.cc:39
std::function< void(const std::string &, int, int)> report
Callback for reporting a progress update.
Definition ProgressMonitor.hh:47
void message(const std::string &)
Log out-of-band messages to the current block.
Definition ProgressMonitor.cc:113
int report_level
Definition ProgressMonitor.hh:50
std::vector< Total > totals() const
Definition ProgressMonitor.cc:136
void print() const
Generate debug output on cerr.
Definition ProgressMonitor.cc:123
void progress()
Set the progress of the current top-level block to be n out of total steps.
Definition ProgressMonitor.cc:91
std::stack< Block > call_stack
Definition ProgressMonitor.hh:94
Definition ProgressMonitor.hh:100
~ScopedProgressGroup()
Definition ProgressMonitor.cc:161
void progress()
Definition ProgressMonitor.cc:167
ProgressMonitor * pm
Definition ProgressMonitor.hh:110