SAT Solver Template
Loading...
Searching...
No Matches
Public Member Functions | List of all members
sat::Profiler Class Reference

Profiler that manages multiple events. More...

#include <Profiler.hpp>

Public Member Functions

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
 

Detailed Description

Profiler that manages multiple events.

Member Function Documentation

◆ addEvent() [1/2]

void sat::Profiler::addEvent ( const TimingEvent event,
const std::string &  name 
)

Adds an event ot the profiler

Parameters
eventevent to be added
nameevent 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
startstart point of the even
endend point of the event
nameevent name

◆ getResult()

template<typename T >
auto sat::Profiler::getResult ( const std::string &  eventName) const
inline

gets the profiling result for an event

Template Parameters
Tduration type
Parameters
eventNamename 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
eventevent name
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
Ttiming type
Parameters
eventNamename of the event
osout stream
nameWidthoptional width formatting parameter for the event name
valWidthoptional 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
Ttiming type
Parameters
osout stream

The documentation for this class was generated from the following files: