class
TimeProfilerTimeProfiler is a simple class that can be used to profile the code.
Public functions
- void setPeriod(int maxCounter)
- Set the output period.
- auto addTimer(const std::string& key) -> bool
- Add a new timer.
- auto setInitTime(const std::string& key) -> bool
- Set the init time for the timer named "key".
- auto setEndTime(const std::string& key) -> bool
- Set the end time for the timer named "key".
- void profiling()
- Print the profiling quantities.
Function documentation
void BipedalLocomotion:: System:: TimeProfiler:: setPeriod(int maxCounter)
Set the output period.
Parameters | |
---|---|
maxCounter | is the period (expressed in cycles). |
bool BipedalLocomotion:: System:: TimeProfiler:: addTimer(const std::string& key)
Add a new timer.
Parameters | |
---|---|
key | is the name of the timer. |
Returns | true/false in case of success/failure. |
bool BipedalLocomotion:: System:: TimeProfiler:: setInitTime(const std::string& key)
Set the init time for the timer named "key".
Parameters | |
---|---|
key | is the name of the timer. |
Returns | true/false in case of success/failure. |
bool BipedalLocomotion:: System:: TimeProfiler:: setEndTime(const std::string& key)
Set the end time for the timer named "key".
Parameters | |
---|---|
key | is the name of the timer. |
Returns | true/false in case of success/failure. |