Statistics Interface.
More...
#include <Statistics.hpp>
|
| enum class | Id {
FirstEnumValue
, Aggregation
, AgnosticModRefSummarizer
, AliasAnalysisPrecisionEvaluation
,
AndersenAnalysis
, Annotation
, CommonNodeElimination
, ControlFlowRecovery
,
DataNodeToDelta
, DeadNodeElimination
, FunctionInlining
, IfConversion
,
InvariantValueRedirection
, JlmToRvsdgConversion
, LoopUnrolling
, LoopUnswitching
,
MemoryStateEncoder
, PullNodes
, PushNodes
, ReduceNodes
,
RegionAwareModRefSummarizer
, RvsdgConstruction
, RvsdgDestruction
, RvsdgOptimization
,
RvsdgTreePrinter
, ScalarEvolution
, LastEnumValue
} |
| |
| using | Measurement = std::variant< std::string, int64_t, uint64_t, double > |
| |
| using | MeasurementList = std::list< std::pair< std::string, Measurement > > |
| |
| using | TimerList = std::list< std::pair< std::string, util::Timer > > |
| |
Statistics Interface.
Definition at line 30 of file Statistics.hpp.
◆ Measurement
◆ MeasurementList
◆ TimerList
◆ Id
| Enumerator |
|---|
| FirstEnumValue | |
| Aggregation | |
| AgnosticModRefSummarizer | |
| AliasAnalysisPrecisionEvaluation | |
| AndersenAnalysis | |
| Annotation | |
| CommonNodeElimination | |
| ControlFlowRecovery | |
| DataNodeToDelta | |
| DeadNodeElimination | |
| FunctionInlining | |
| IfConversion | |
| InvariantValueRedirection | |
| JlmToRvsdgConversion | |
| LoopUnrolling | |
| LoopUnswitching | |
| MemoryStateEncoder | |
| PullNodes | |
| PushNodes | |
| ReduceNodes | |
| RegionAwareModRefSummarizer | |
| RvsdgConstruction | |
| RvsdgDestruction | |
| RvsdgOptimization | |
| RvsdgTreePrinter | |
| ScalarEvolution | |
| LastEnumValue | |
Definition at line 33 of file Statistics.hpp.
◆ ~Statistics()
| jlm::util::Statistics::~Statistics |
( |
| ) |
|
|
virtualdefault |
Reimplemented in jlm::llvm::LoopUnrolling::Statistics, jlm::llvm::RvsdgTreePrinter::Statistics, jlm::llvm::NodeHoisting::Statistics, jlm::llvm::NodeSinking::Statistics, jlm::llvm::LoopUnswitching::Statistics, jlm::llvm::InvariantValueRedirection::Statistics, jlm::llvm::FunctionInlining::Statistics, jlm::llvm::DeadNodeElimination::Statistics, jlm::llvm::CommonNodeElimination::Statistics, jlm::llvm::aa::RegionAwareModRefSummarizer::Statistics, jlm::llvm::aa::Andersen::Statistics, jlm::llvm::RvsdgToIpGraphConverter::Statistics, jlm::hls::CommonNodeElimination::Statistics, jlm::rvsdg::TransformationSequence::Statistics, jlm::llvm::ScalarEvolution::Statistics, and jlm::llvm::NodeReduction::Statistics.
◆ Statistics()
◆ AddMeasurement()
template<typename T >
| void jlm::util::Statistics::AddMeasurement |
( |
std::string |
name, |
|
|
T |
value |
|
) |
| |
|
inlineprotected |
Adds a measurement, identified by name, with the given value. Requires that the measurement doesn't already exist.
- Template Parameters
-
| T | the type of the measurement, must be one of: std::string, int64_t, uint64_t, double |
Definition at line 174 of file Statistics.hpp.
◆ AddTimer()
| util::Timer & jlm::util::Statistics::AddTimer |
( |
std::string |
name | ) |
|
|
protected |
Creates a new timer with the given name. Requires that the timer does not already exist.
- Returns
- a reference to the timer
Definition at line 155 of file Statistics.cpp.
◆ GetId()
◆ GetMeasurement()
Gets the measurement with the given name, it must exist.
- Returns
- a reference to the measurement.
Definition at line 110 of file Statistics.cpp.
◆ GetMeasurements()
| IteratorRange< Statistics::MeasurementList::const_iterator > jlm::util::Statistics::GetMeasurements |
( |
| ) |
const |
Retrieves the full list of measurements
Definition at line 119 of file Statistics.cpp.
◆ GetMeasurementValue()
template<typename T >
| const T& jlm::util::Statistics::GetMeasurementValue |
( |
const std::string & |
name | ) |
const |
|
inline |
Gets the value of the measurement with the given name. Requires the measurement to exist and have the given type
- Template Parameters
-
- Returns
- the measurement's value.
Definition at line 130 of file Statistics.hpp.
◆ GetName()
| std::string_view jlm::util::Statistics::GetName |
( |
| ) |
const |
◆ GetSourceFile()
- Returns
- the source file that was worked on while capturing these statistics
Definition at line 63 of file Statistics.cpp.
◆ GetTimer() [1/2]
| util::Timer & jlm::util::Statistics::GetTimer |
( |
const std::string & |
name | ) |
|
|
protected |
Retrieves the timer with the given name. Requires that the timer already exists.
- Returns
- a reference to the timer
Definition at line 134 of file Statistics.cpp.
◆ GetTimer() [2/2]
| const util::Timer & jlm::util::Statistics::GetTimer |
( |
const std::string & |
name | ) |
const |
|
protected |
◆ GetTimerElapsedNanoseconds()
| size_t jlm::util::Statistics::GetTimerElapsedNanoseconds |
( |
const std::string & |
name | ) |
const |
|
inline |
Retrieves the measured time passed on the timer with the given name. Requires the timer to exist, and not currently be running.
- Returns
- the timer's elapsed time in nanoseconds
Definition at line 155 of file Statistics.hpp.
◆ GetTimers()
| IteratorRange< Statistics::TimerList::const_iterator > jlm::util::Statistics::GetTimers |
( |
| ) |
const |
◆ HasMeasurement()
| bool jlm::util::Statistics::HasMeasurement |
( |
const std::string & |
name | ) |
const |
|
noexcept |
Checks if a measurement with the given name exists.
- Returns
- true if the measurement exists, false otherwise.
Definition at line 101 of file Statistics.cpp.
◆ HasTimer()
| bool jlm::util::Statistics::HasTimer |
( |
const std::string & |
name | ) |
const |
|
noexcept |
Checks if a timer with the given name exists.
- Returns
- true if the timer exists, false otherwise.
Definition at line 125 of file Statistics.cpp.
◆ Serialize()
| std::string jlm::util::Statistics::Serialize |
( |
char |
fieldSeparator, |
|
|
char |
nameValueSeparator |
|
) |
| const |
Converts the Statistics instance to a string containing all information it has. Requires all timers to be stopped.
- Parameters
-
| fieldSeparator | Separation character used between different measurements and/or timers. |
| nameValueSeparator | Separation character used between the name and value of a measurement or timer. |
- Returns
- a full serialized description of the Statistic instance
Definition at line 69 of file Statistics.cpp.
◆ Measurements_
◆ SourceFile_
◆ StatisticsId_
◆ Timers_
The documentation for this class was generated from the following files: