Internal: Generic Statistics collection.
More...
#include <senf/Utils/Statistics.hh>
|
unsigned | cnt () const |
| Last cnt value entered. More...
|
|
float | min () const |
| Last min value entered. More...
|
|
float | avg () const |
| Last avg value entered. More...
|
|
float | max () const |
| Last max value entered. More...
|
|
float | dev () const |
| Last dev value entered. More...
|
|
virtual unsigned | rank () const |
| Return collectors rank value. More...
|
|
Internal: Generic Statistics collection.
Definition at line 59 of file Statistics.hh.
◆ CollectorRange
◆ const_CollectorRange
◆ StatisticsBase()
senf::StatisticsBase::StatisticsBase |
( |
| ) |
|
|
protected |
◆ ~StatisticsBase()
virtual senf::StatisticsBase::~StatisticsBase |
( |
| ) |
|
|
protectedvirtual |
◆ avg()
float senf::StatisticsBase::avg |
( |
| ) |
const |
◆ base() [1/2]
Statistics const& senf::StatisticsBase::base |
( |
| ) |
const |
◆ base() [2/2]
Get base statistics object.
Returns the base statistics object. If this is a child collector, this will return the outermost statistics object, otherwise it will return *this
.
◆ cnt()
unsigned senf::StatisticsBase::cnt |
( |
| ) |
const |
◆ collect()
Register a new collector.
Adds a collector collecting rank values into each combined value.
- Parameters
-
[in] | rank | number of values to collect |
- Returns
- Reference to new collector
- Exceptions
-
Definition at line 68 of file Statistics.cc.
◆ collectors() [1/2]
List all child collectors.
- Returns
- iterator range of child collector references
◆ collectors() [2/2]
List all child collectors.
- Returns
- iterator range of child collector references
◆ consoleList()
void senf::StatisticsBase::consoleList |
( |
unsigned |
level, |
|
|
std::ostream & |
os |
|
) |
| const |
◆ data()
◆ dev()
float senf::StatisticsBase::dev |
( |
| ) |
const |
◆ enter()
void senf::StatisticsBase::enter |
( |
unsigned |
n, |
|
|
unsigned |
cnt, |
|
|
float |
min, |
|
|
float |
avg, |
|
|
float |
max, |
|
|
float |
dev |
|
) |
| |
|
protected |
◆ max()
float senf::StatisticsBase::max |
( |
| ) |
const |
◆ min()
float senf::StatisticsBase::min |
( |
| ) |
const |
◆ operator[]() [1/2]
Get child collector.
This member will return a reference to the collector collecting rank values.
- Parameters
-
[in] | rank | Number of values the requested collector collects into each combined value. |
- Exceptions
-
Definition at line 51 of file Statistics.cc.
◆ operator[]() [2/2]
senf::Collector const & senf::StatisticsBase::operator[] |
( |
unsigned |
rank | ) |
const |
Get child collector.
This member will return a const reference to the collector collecting rank values.
- Parameters
-
[in] | rank | Number of values the requested collector collects into each combined value. |
- Exceptions
-
Definition at line 59 of file Statistics.cc.
◆ output()
Register output.
This call will request the collector to output statistics build by averaging the last n values. This output is generated for every new value in the collector. The output signal can be connected to an arbitrary target using the returned proxy. Example:
stats.output(4u).connect(
senf::StatisticsLogger());
- Parameters
-
[in] | n | size of sliding average window |
Definition at line 78 of file Statistics.cc.
◆ path()
std::string senf::StatisticsBase::path |
( |
| ) |
const |
Get the path to this collector.
Returns the '-'-separated list of collectors up to here. If this is the basic statistics object, the value is empty, otherwise it is built by joining the collector ranks.
◆ rank()
virtual unsigned senf::StatisticsBase::rank |
( |
| ) |
const |
|
virtual |
Return collectors rank value.
- Returns
- number of basic values collected into each new value by this collector.
Reimplemented in senf::Collector.
The documentation for this class was generated from the following files: