Simple timer class.
More...
#include <alsuq/stats/StatisticsTimer.hpp>
◆ StatisticsTimer()
alsuq::stats::StatisticsTimer::StatisticsTimer |
( |
const std::string & |
name, |
|
|
std::shared_ptr< Statistics > |
statistics |
|
) |
| |
◆ ~StatisticsTimer()
alsuq::stats::StatisticsTimer::~StatisticsTimer |
( |
| ) |
|
◆ addWriter()
void alsuq::stats::StatisticsTimer::addWriter |
( |
const std::string & |
name, |
|
|
std::shared_ptr< alsfvm::io::Writer > & |
writer |
|
) |
| |
|
overridevirtual |
Adds a write for the given statistics name
- Parameters
-
name | the name of the statitics (one of the names returned in getStatiticsNames() |
writer | the writer to use |
Implements alsuq::stats::Statistics.
◆ combineStatistics()
void alsuq::stats::StatisticsTimer::combineStatistics |
( |
| ) |
|
|
overridevirtual |
◆ computeStatistics()
◆ finalizeStatistics()
void alsuq::stats::StatisticsTimer::finalizeStatistics |
( |
| ) |
|
|
overridevirtual |
To be called in the end, this could be to eg compute the variance through M_2-mean^2 or any other postprocessing needed
Implements alsuq::stats::Statistics.
◆ getStatisticsNames()
std::vector< std::string > alsuq::stats::StatisticsTimer::getStatisticsNames |
( |
| ) |
const |
|
overridevirtual |
Returns a list of the names of the statistics being computed, typically this could be ['mean', 'variance']
Implements alsuq::stats::Statistics.
◆ writeStatistics()
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/alsvinn/checkouts/latest/alsuq/include/alsuq/stats/StatisticsTimer.hpp
- /home/docs/checkouts/readthedocs.org/user_builds/alsvinn/checkouts/latest/alsuq/src/stats/StatisticsTimer.cpp