code_profiler
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
tue::Profiler Class Reference

#include <profiler.h>

Public Member Functions

const std::stringgetName () const
 
 Profiler ()
 
 Profiler (const std::string &name)
 
void setName (const std::string &name)
 
void startTimer (const std::string &name)
 
void stopTimer ()
 
virtual ~Profiler ()
 

Protected Member Functions

void addToStream (std::ostream &out, const std::string &prefix="") const
 
 Profiler (const std::string &name, Profiler *parent)
 

Protected Attributes

std::map< std::string, Profiler * > children_
 
Profilerhead_
 
std::string name_
 
Profilerparent_
 
Timer timer_
 

Friends

std::ostreamoperator<< (std::ostream &out, const Profiler &p)
 

Detailed Description

Definition at line 11 of file profiler.h.

Constructor & Destructor Documentation

◆ Profiler() [1/3]

tue::Profiler::Profiler ( )

Definition at line 10 of file profiler.cpp.

◆ Profiler() [2/3]

tue::Profiler::Profiler ( const std::string name)

Definition at line 16 of file profiler.cpp.

◆ ~Profiler()

tue::Profiler::~Profiler ( )
virtual

Definition at line 28 of file profiler.cpp.

◆ Profiler() [3/3]

tue::Profiler::Profiler ( const std::string name,
Profiler parent 
)
protected

Definition at line 22 of file profiler.cpp.

Member Function Documentation

◆ addToStream()

void tue::Profiler::addToStream ( std::ostream out,
const std::string prefix = "" 
) const
protected

Definition at line 78 of file profiler.cpp.

◆ getName()

const std::string& tue::Profiler::getName ( ) const
inline

Definition at line 24 of file profiler.h.

◆ setName()

void tue::Profiler::setName ( const std::string name)
inline

Definition at line 22 of file profiler.h.

◆ startTimer()

void tue::Profiler::startTimer ( const std::string name)

Definition at line 38 of file profiler.cpp.

◆ stopTimer()

void tue::Profiler::stopTimer ( )

Definition at line 64 of file profiler.cpp.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream out,
const Profiler p 
)
friend

Definition at line 97 of file profiler.cpp.

Member Data Documentation

◆ children_

std::map<std::string, Profiler*> tue::Profiler::children_
protected

Definition at line 42 of file profiler.h.

◆ head_

Profiler* tue::Profiler::head_
protected

Definition at line 36 of file profiler.h.

◆ name_

std::string tue::Profiler::name_
protected

Definition at line 34 of file profiler.h.

◆ parent_

Profiler* tue::Profiler::parent_
protected

Definition at line 38 of file profiler.h.

◆ timer_

Timer tue::Profiler::timer_
protected

Definition at line 40 of file profiler.h.


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