Profiler that manages multiple events.
More...
#include <Profiler.hpp>
|
| void | addEvent (const TimingEvent &event, const std::string &name) |
| |
| void | addEvent (detail::TP start, detail::TP end, const std::string &name) |
| |
| template<typename T > |
| auto | getResult (const std::string &eventName) const |
| |
| template<typename T > |
| void | print (const std::string &eventName, std::ostream &os, int nameWidth=0, int valWidth=0) const |
| |
| bool | has (const std::string &event) const noexcept |
| |
| template<typename T > |
| void | printAll (std::ostream &os) const |
| |
Profiler that manages multiple events.
◆ addEvent() [1/2]
| void sat::Profiler::addEvent |
( |
const TimingEvent & |
event, |
|
|
const std::string & |
name |
|
) |
| |
Adds an event ot the profiler
- Parameters
-
| event | event to be added |
| name | event name |
◆ addEvent() [2/2]
| void sat::Profiler::addEvent |
( |
detail::TP |
start, |
|
|
detail::TP |
end, |
|
|
const std::string & |
name |
|
) |
| |
Adds an event ot the profiler
- Parameters
-
| start | start point of the even |
| end | end point of the event |
| name | event name |
◆ getResult()
template<typename T >
| auto sat::Profiler::getResult |
( |
const std::string & |
eventName | ) |
const |
|
inline |
gets the profiling result for an event
- Template Parameters
-
- Parameters
-
| eventName | name of the event |
- Returns
- profiling result
◆ has()
| bool sat::Profiler::has |
( |
const std::string & |
event | ) |
const |
|
inlinenoexcept |
Checks whether profiling data on a specific event is available
- Parameters
-
- Returns
- true if event occurred at least once, false otherwise
◆ print()
template<typename T >
| void sat::Profiler::print |
( |
const std::string & |
eventName, |
|
|
std::ostream & |
os, |
|
|
int |
nameWidth = 0, |
|
|
int |
valWidth = 0 |
|
) |
| const |
|
inline |
prints a profiling result to an out stream
- Template Parameters
-
- Parameters
-
| eventName | name of the event |
| os | out stream |
| nameWidth | optional width formatting parameter for the event name |
| valWidth | optional width formatting parameter for the result values |
◆ printAll()
template<typename T >
| void sat::Profiler::printAll |
( |
std::ostream & |
os | ) |
const |
|
inline |
prints all events to an out stream
- Template Parameters
-
- Parameters
-
The documentation for this class was generated from the following files: