|
Jlm
|
Statistics Interface. More...
#include <Statistics.hpp>


Classes | |
| struct | Label |
Public Types | |
| enum class | Id { FirstEnumValue , AggregateAllocaSplitting , Aggregation , AgnosticModRefSummarizer , AliasAnalysisPrecisionEvaluation , AndersenAnalysis , Annotation , CommonNodeElimination , ControlFlowRecovery , DataNodeToDelta , DeadNodeElimination , FunctionInlining , IfConversion , InvariantValueRedirection , JlmToRvsdgConversion , LoopStrengthReduction , LoopUnrolling , LoopUnswitching , MemoryStateEncoder , PullNodes , PushNodes , ReduceNodes , RegionAwareModRefSummarizer , RvsdgConstruction , RvsdgDestruction , RvsdgOptimization , RvsdgTreePrinter , ScalarEvolution , StoreValueForwarding , 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 > > |
Public Member Functions | |
| virtual | ~Statistics () |
| Statistics (const Statistics::Id &statisticsId, util::FilePath sourceFile) | |
| Statistics::Id | GetId () const noexcept |
| std::string_view | GetName () const |
| const util::FilePath & | GetSourceFile () const |
| std::string | Serialize (char fieldSeparator, char nameValueSeparator) const |
| bool | HasMeasurement (const std::string &name) const noexcept |
| const Measurement & | GetMeasurement (const std::string &name) const |
| template<typename T > | |
| const T & | GetMeasurementValue (const std::string &name) const |
| IteratorRange< MeasurementList::const_iterator > | GetMeasurements () const |
| bool | HasTimer (const std::string &name) const noexcept |
| size_t | GetTimerElapsedNanoseconds (const std::string &name) const |
| IteratorRange< TimerList::const_iterator > | GetTimers () const |
Protected Member Functions | |
| template<typename T > | |
| void | AddMeasurement (std::string name, T value) |
| util::Timer & | AddTimer (std::string name) |
| util::Timer & | GetTimer (const std::string &name) |
| const util::Timer & | GetTimer (const std::string &name) const |
Private Attributes | |
| Statistics::Id | StatisticsId_ |
| util::FilePath | SourceFile_ |
| MeasurementList | Measurements_ |
| TimerList | Timers_ |
Statistics Interface.
Definition at line 30 of file Statistics.hpp.
| using jlm::util::Statistics::Measurement = std::variant<std::string, int64_t, uint64_t, double> |
Definition at line 69 of file Statistics.hpp.
| using jlm::util::Statistics::MeasurementList = std::list<std::pair<std::string, Measurement> > |
Definition at line 71 of file Statistics.hpp.
| using jlm::util::Statistics::TimerList = std::list<std::pair<std::string, util::Timer> > |
Definition at line 72 of file Statistics.hpp.
|
strong |
Definition at line 33 of file Statistics.hpp.
|
virtualdefault |
Reimplemented in jlm::llvm::LoopUnrolling::Statistics, jlm::llvm::StoreValueForwarding::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, jlm::llvm::NodeReduction::Statistics, jlm::llvm::LoopStrengthReduction::Statistics, and jlm::llvm::AggregateAllocaSplitting::Statistics.
|
inline |
Definition at line 76 of file Statistics.hpp.
|
inlineprotected |
Adds a measurement, identified by name, with the given value. Requires that the measurement doesn't already exist.
| T | the type of the measurement, must be one of: std::string, int64_t, uint64_t, double |
Definition at line 177 of file Statistics.hpp.
|
protected |
Creates a new timer with the given name. Requires that the timer does not already exist.
Definition at line 158 of file Statistics.cpp.
|
inlinenoexcept |
Definition at line 82 of file Statistics.hpp.
| const Statistics::Measurement & jlm::util::Statistics::GetMeasurement | ( | const std::string & | name | ) | const |
Gets the measurement with the given name, it must exist.
Definition at line 113 of file Statistics.cpp.
| IteratorRange< Statistics::MeasurementList::const_iterator > jlm::util::Statistics::GetMeasurements | ( | ) | const |
Retrieves the full list of measurements
Definition at line 122 of file Statistics.cpp.
|
inline |
Gets the value of the measurement with the given name. Requires the measurement to exist and have the given type
| T. |
Definition at line 133 of file Statistics.hpp.
| std::string_view jlm::util::Statistics::GetName | ( | ) | const |
Definition at line 60 of file Statistics.cpp.
| const util::FilePath & jlm::util::Statistics::GetSourceFile | ( | ) | const |
Definition at line 66 of file Statistics.cpp.
|
protected |
Retrieves the timer with the given name. Requires that the timer already exists.
Definition at line 137 of file Statistics.cpp.
|
protected |
Definition at line 146 of file Statistics.cpp.
|
inline |
Retrieves the measured time passed on the timer with the given name. Requires the timer to exist, and not currently be running.
Definition at line 158 of file Statistics.hpp.
| IteratorRange< Statistics::TimerList::const_iterator > jlm::util::Statistics::GetTimers | ( | ) | const |
Retrieves the full list of timers
Definition at line 152 of file Statistics.cpp.
|
noexcept |
Checks if a measurement with the given name exists.
Definition at line 104 of file Statistics.cpp.
|
noexcept |
Checks if a timer with the given name exists.
Definition at line 128 of file Statistics.cpp.
| 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.
| fieldSeparator | Separation character used between different measurements and/or timers. |
| nameValueSeparator | Separation character used between the name and value of a measurement or timer. |
Definition at line 72 of file Statistics.cpp.
|
private |
Definition at line 258 of file Statistics.hpp.
|
private |
Definition at line 256 of file Statistics.hpp.
|
private |
Definition at line 255 of file Statistics.hpp.
|
private |
Definition at line 259 of file Statistics.hpp.