General-purpose statistics counter.
More...
#include <mitsuba/core/statistics.h>
General-purpose statistics counter.
This class implements a simple counter, which can be used to track various quantities within Mitsuba. At various points during the execution, it is possible to then call Statistics::printStats() to get a human-readable report of their values.
mitsuba::StatsCounter::StatsCounter |
( |
const std::string & |
category, |
|
|
const std::string & |
name, |
|
|
EStatsType |
type = ENumberValue , |
|
|
uint64_t |
initial = 0L , |
|
|
uint64_t |
base = 0L |
|
) |
| |
Create a new statistics counter.
- Parameters
-
category | Category of the counter when shown in the statistics summary |
name | Name of the counter when shown in the statistics summary |
type | Characterization of the quantity that will be measured |
initial | Initial value of the counter |
base | Initial value of the base counter (only for type == EPercentage and EAverage ) |
mitsuba::StatsCounter::~StatsCounter |
( |
| ) |
|
Free all storage used by the counter.
uint64_t mitsuba::StatsCounter::getBase |
( |
| ) |
const |
|
inline |
Get the reference number (only used with the EPercentage/EAverage counter type)
const std::string& mitsuba::StatsCounter::getCategory |
( |
| ) |
const |
|
inline |
Return the category of this counter.
uint64_t mitsuba::StatsCounter::getMaximum |
( |
| ) |
const |
|
inline |
uint64_t mitsuba::StatsCounter::getMinimum |
( |
| ) |
const |
|
inline |
const std::string& mitsuba::StatsCounter::getName |
( |
| ) |
const |
|
inline |
Return the name of this counter.
EStatsType mitsuba::StatsCounter::getType |
( |
| ) |
const |
|
inline |
Return the type of this counter.
uint64_t mitsuba::StatsCounter::getValue |
( |
| ) |
const |
|
inline |
Return the value of this counter as 64-bit unsigned integer.
void mitsuba::StatsCounter::incrementBase |
( |
size_t |
amount = 1 | ) |
|
|
inline |
Increment the base counter by the specified amount (only for use with EPercentage/EAverage)
uint64_t mitsuba::StatsCounter::operator++ |
( |
| ) |
|
|
inline |
Increment the counter value by one.
void mitsuba::StatsCounter::operator+= |
( |
size_t |
amount | ) |
|
|
inline |
Increment the counter by the specified amount.
Sorting by name (for the statistics)
void mitsuba::StatsCounter::recordMaximum |
( |
size_t |
value | ) |
|
|
inline |
When this is a maximum "counter", this function records an observation of the quantity whose maximum is to be determined.
void mitsuba::StatsCounter::recordMinimum |
( |
size_t |
value | ) |
|
|
inline |
When this is a minimum "counter", this function records an observation of the quantity whose minimum is to be determined.
void mitsuba::StatsCounter::reset |
( |
| ) |
|
|
inline |
Reset the stored counter values.
The documentation for this class was generated from the following file: