Resource counter used for storing operation count, call count, timing information. More...
#include <Counter.h>

Public Member Functions | |
| Counter ()=default | |
| Counter (bool with_cpu_time, bool with_wall_time) | |
| Counter (size_t call_count_, size_t operation_count_, double wall_time_, double cpu_time_, bool with_cpu_time, bool with_wall_time) | |
| Construct counter with initial values. More... | |
| Counter & | start () |
| Start timing, and increment call_count;. More... | |
| Counter & | stop () |
| Stop timing. More... | |
| Counter & | reset () |
| Reset all counters and timers. More... | |
| void | add_operations (size_t ops) |
| Add to the operation count. More... | |
| void | operator+= (const Counter &other) |
| Accumulates all attributes. More... | |
| size_t | get_call_count () const |
| size_t | get_operation_count () const |
| const Timer & | get_cpu () const |
| const Timer & | get_wall () const |
Protected Attributes | |
| size_t | call_count = 0 |
| number of times this node was merged More... | |
| size_t | operation_count = 0 |
| number of operations performed More... | |
| Timer | cpu = {Timer::cpu, true} |
| cpu time More... | |
| Timer | wall = {Timer::wall, true} |
| wall time More... | |
Resource counter used for storing operation count, call count, timing information.
|
default |
| molpro::profiler::Counter::Counter | ( | bool | with_cpu_time, |
| bool | with_wall_time | ||
| ) |
| molpro::profiler::Counter::Counter | ( | size_t | call_count_, |
| size_t | operation_count_, | ||
| double | wall_time_, | ||
| double | cpu_time_, | ||
| bool | with_cpu_time, | ||
| bool | with_wall_time | ||
| ) |
Construct counter with initial values.
|
inline |
Add to the operation count.
|
inline |
|
inline |
|
inline |
|
inline |
| void molpro::profiler::Counter::operator+= | ( | const Counter & | other | ) |
Accumulates all attributes.
| Counter & molpro::profiler::Counter::reset | ( | ) |
Reset all counters and timers.
| Counter & molpro::profiler::Counter::start | ( | ) |
Start timing, and increment call_count;.
| Counter & molpro::profiler::Counter::stop | ( | ) |
Stop timing.
|
protected |
number of times this node was merged
|
protected |
cpu time
|
protected |
number of operations performed
|
protected |
wall time