Chi-Tech
|
#include <TimingLog.h>
Public Member Functions | |
TimingBlock (const std::string &name) | |
TimingBlock (const TimingBlock &other)=delete | |
TimingBlock (TimingBlock &&other)=delete | |
void | TimeSectionBegin () |
void | TimeSectionEnd () |
size_t | NumberOfOccurences () const |
double | TotalTime () const |
double | AverageTime () const |
double | LastDelta () const |
std::string | MakeGraphString () |
Protected Member Functions | |
void | AddChild (const TimingBlock &child_block) |
void | AppendGraphEntry (std::vector< std::vector< std::string > > &string_matrix, const TimingBlock *parent, const std::string &indent) const |
Protected Attributes | |
const std::string | name_ |
size_t | num_occurences_ = 0 |
double | total_time_ = 0.0 |
double | reference_time_ = 0.0 |
double | last_delta_time_ = 0.0 |
std::vector< const TimingBlock * > | children_ |
Friends | |
class | TimingLog |
Hierarchical timing block to efficiently capture timing.
Definition at line 42 of file TimingLog.h.
|
explicit |
Constructs the given block with the given name.
Definition at line 76 of file TimingLog.cc.
|
delete |
Deleted copy constructor.
|
delete |
Deleted move constructor.
|
protected |
Adds the supplied timing black as a child.
Definition at line 107 of file TimingLog.cc.
|
protected |
Used when building the graph, this is a recursive function that adds each entry to a matrix.
Definition at line 197 of file TimingLog.cc.
double chi::TimingBlock::AverageTime | ( | ) | const |
Returns the average time per occurence.
Definition at line 95 of file TimingLog.cc.
double chi::TimingBlock::LastDelta | ( | ) | const |
Returns the last computed time differential.
Definition at line 102 of file TimingLog.cc.
std::string chi::TimingBlock::MakeGraphString | ( | ) |
Makes a string table of the timing block and all its children.
Lambda to left pad an entry.
Lambda to right pad an entry.
Definition at line 112 of file TimingLog.cc.
size_t chi::TimingBlock::NumberOfOccurences | ( | ) | const |
Returns the number of timing section occurrences.
Definition at line 91 of file TimingLog.cc.
void chi::TimingBlock::TimeSectionBegin | ( | ) |
Begins a timing section by resetting the reference time.
Definition at line 78 of file TimingLog.cc.
void chi::TimingBlock::TimeSectionEnd | ( | ) |
Ends a timing section, contributes to the total time and adds an occurrence.
Definition at line 83 of file TimingLog.cc.
double chi::TimingBlock::TotalTime | ( | ) | const |
Returns the computed total time over all occurrences.
Definition at line 93 of file TimingLog.cc.
|
friend |
Definition at line 71 of file TimingLog.h.
|
protected |
Definition at line 85 of file TimingLog.h.
|
protected |
Definition at line 84 of file TimingLog.h.
|
protected |
Definition at line 80 of file TimingLog.h.
|
protected |
Definition at line 81 of file TimingLog.h.
|
protected |
Definition at line 83 of file TimingLog.h.
|
protected |
Definition at line 82 of file TimingLog.h.