SOFA API  014b24ea
Open source framework for multi-physics simuation
sofa::helper::AdvancedTimer Class Reference

#include <AdvancedTimer.h>

Classes

class  Id
 
class  Obj
 
class  Step
 
class  StepVar
 
class  Timer
 
class  TimerVar
 
class  Val
 

Static Public Member Functions

static bool isEnabled (IdTimer id)
 
static void setEnabled (IdTimer id, bool val)
 
static int getInterval (IdTimer id)
 
static void setInterval (IdTimer id, int val)
 
static AdvancedTimer::outputType convertOutputType (std::string type)
 convertOutputType convert a string to the output type More...
 
static void setOutputType (IdTimer id, const std::string &type)
 setOutputType Set the outputType for the given AdvancedTimer. More...
 
static AdvancedTimer::outputType getOutputType (IdTimer id)
 getOutputType Get the outputType for the given AdvancedTimer. More...
 
static std::string getTimeAnalysis (IdTimer id, simulation::Node *node)
 getTimeAnalysis Return the result of the AdvancedTimer More...
 
static helper::vector< AdvancedTimer::IdStepgetSteps (IdTimer id, bool processData=false)
 getSteps Return the vector of IDStep of the AdvancedTimer given execution More...
 
static std::map< AdvancedTimer::IdStep, StepDatagetStepData (IdTimer id, bool processData=false)
 getStepData Return the map of StepData of the AdvancedTimer given execution More...
 
static helper::vector< RecordgetRecords (IdTimer id)
 getRecords the vector of Record of the AdvancedTimer given execution id. More...
 
static void clearData (IdTimer id)
 clearDatato clear a specific Timer Data More...
 
static void clear ()
 
static void begin (IdTimer id)
 
static void end (IdTimer id)
 
static void end (IdTimer id, std::ostream &result)
 
static std::string end (IdTimer id, simulation::Node *node)
 end Ovveride fo the end method in which you can use JSON or old format More...
 
static bool isActive ()
 
static void stepBegin (IdStep id)
 
static void stepBegin (IdStep id, IdObj obj)
 
template<class T >
static void stepBegin (IdStep id, T *obj)
 
static void stepEnd (IdStep id)
 
static void stepEnd (IdStep id, IdObj obj)
 
template<class T >
static void stepEnd (IdStep id, T *obj)
 
static void stepNext (IdStep prevId, IdStep nextId)
 
static void step (IdStep id)
 
static void step (IdStep id, IdObj obj)
 
template<class T >
static void step (IdStep id, T *obj)
 
static void begin (const char *idStr)
 
static void end (const char *idStr)
 
static void stepBegin (const char *idStr)
 
static void stepBegin (const char *idStr, const char *objStr)
 
static void stepBegin (const char *idStr, const std::string &objStr)
 
template<class T >
static void stepBegin (const char *idStr, T *obj)
 
static void stepEnd (const char *idStr)
 
static void stepEnd (const char *idStr, const char *objStr)
 
static void stepEnd (const char *idStr, const std::string &objStr)
 
template<class T >
static void stepEnd (const char *idStr, T *obj)
 
static void stepNext (const char *prevIdStr, const char *nextIdStr)
 
static void step (const char *idStr)
 
static void step (const char *idStr, const char *objStr)
 
static void step (const char *idStr, const std::string &objStr)
 
template<class T >
static void step (const char *idStr, T *obj)
 
static void valSet (IdVal id, double val)
 
static void valAdd (IdVal id, double val)
 
static void valSet (const char *idStr, double val)
 
static void valAdd (const char *idStr, double val)
 
static std::pair< SyncCallBack, void * > setSyncCallBack (SyncCallBack cb, void *userData=nullptr)
 

Function details

void sofa::helper::AdvancedTimer::begin ( IdTimer  id)
static
void sofa::helper::AdvancedTimer::begin ( const char *  idStr)
static
void sofa::helper::AdvancedTimer::clear ( )
static
void sofa::helper::AdvancedTimer::clearData ( IdTimer  id)
static

clearDatato clear a specific Timer Data

Parameters
idIdTimer, id of the timer
AdvancedTimer::outputType sofa::helper::AdvancedTimer::convertOutputType ( std::string  type)
static

convertOutputType convert a string to the output type

Parameters
typestd::string, output type name (example : "json")
Returns
outputType, output type enum
void sofa::helper::AdvancedTimer::end ( IdTimer  id)
static
void sofa::helper::AdvancedTimer::end ( IdTimer  id,
std::ostream &  result 
)
static
std::string sofa::helper::AdvancedTimer::end ( IdTimer  id,
simulation::Node node 
)
static

end Ovveride fo the end method in which you can use JSON or old format

Parameters
idIdTimer, the id of the used timer
nodeNode*, node used to get the scene cotext
Returns
std::string, the output if JSON format is set
void sofa::helper::AdvancedTimer::end ( const char *  idStr)
static
int sofa::helper::AdvancedTimer::getInterval ( IdTimer  id)
static
AdvancedTimer::outputType sofa::helper::AdvancedTimer::getOutputType ( IdTimer  id)
static

getOutputType Get the outputType for the given AdvancedTimer.

Parameters
ididTimer, id of the timer
Returns
the output type
helper::vector< Record > sofa::helper::AdvancedTimer::getRecords ( IdTimer  id)
static

getRecords the vector of Record of the AdvancedTimer given execution id.

Parameters
idIdTimer, id of the timer
Returns
The timer full records inside a vector of Record
std::map< AdvancedTimer::IdStep, StepData > sofa::helper::AdvancedTimer::getStepData ( IdTimer  id,
bool  processData = false 
)
static

getStepData Return the map of StepData of the AdvancedTimer given execution

Parameters
idIdTimer, id of the timer
processDatabool, if true, will force timer data to be processed
Returns
The timer StepData of each timer step inside a map
helper::vector< AdvancedTimer::IdStep > sofa::helper::AdvancedTimer::getSteps ( IdTimer  id,
bool  processData = false 
)
static

getSteps Return the vector of IDStep of the AdvancedTimer given execution

Parameters
idIdTimer, id of the timer
processDatabool, if true, will force timer data to be processed
Returns
The timer steps iterator inside a vector
std::string sofa::helper::AdvancedTimer::getTimeAnalysis ( IdTimer  id,
simulation::Node node 
)
static

getTimeAnalysis Return the result of the AdvancedTimer

Parameters
idIdTimer, id of the timer
nodeNode*, pointeur on a node to get the scene simulation context
Returns
The timer value in JSON
bool sofa::helper::AdvancedTimer::isActive ( )
static
bool sofa::helper::AdvancedTimer::isEnabled ( IdTimer  id)
static
void sofa::helper::AdvancedTimer::setEnabled ( IdTimer  id,
bool  val 
)
static
void sofa::helper::AdvancedTimer::setInterval ( IdTimer  id,
int  val 
)
static
void sofa::helper::AdvancedTimer::setOutputType ( IdTimer  id,
const std::string &  type 
)
static

setOutputType Set the outputType for the given AdvancedTimer.

Parameters
idIdTimer, id of the timer
typestd::string, output type name (example : "json")
std::pair< AdvancedTimer::SyncCallBack, void * > sofa::helper::AdvancedTimer::setSyncCallBack ( SyncCallBack  cb,
void *  userData = nullptr 
)
static
void sofa::helper::AdvancedTimer::step ( IdStep  id)
static
void sofa::helper::AdvancedTimer::step ( IdStep  id,
IdObj  obj 
)
static
template<class T >
static void sofa::helper::AdvancedTimer::step ( IdStep  id,
T *  obj 
)
inlinestatic
void sofa::helper::AdvancedTimer::step ( const char *  idStr)
static
void sofa::helper::AdvancedTimer::step ( const char *  idStr,
const char *  objStr 
)
static
void sofa::helper::AdvancedTimer::step ( const char *  idStr,
const std::string &  objStr 
)
static
template<class T >
static void sofa::helper::AdvancedTimer::step ( const char *  idStr,
T *  obj 
)
inlinestatic
void sofa::helper::AdvancedTimer::stepBegin ( IdStep  id)
static
void sofa::helper::AdvancedTimer::stepBegin ( IdStep  id,
IdObj  obj 
)
static
template<class T >
static void sofa::helper::AdvancedTimer::stepBegin ( IdStep  id,
T *  obj 
)
inlinestatic
void sofa::helper::AdvancedTimer::stepBegin ( const char *  idStr)
static
void sofa::helper::AdvancedTimer::stepBegin ( const char *  idStr,
const char *  objStr 
)
static
void sofa::helper::AdvancedTimer::stepBegin ( const char *  idStr,
const std::string &  objStr 
)
static
template<class T >
static void sofa::helper::AdvancedTimer::stepBegin ( const char *  idStr,
T *  obj 
)
inlinestatic
void sofa::helper::AdvancedTimer::stepEnd ( IdStep  id)
static
void sofa::helper::AdvancedTimer::stepEnd ( IdStep  id,
IdObj  obj 
)
static
template<class T >
static void sofa::helper::AdvancedTimer::stepEnd ( IdStep  id,
T *  obj 
)
inlinestatic
void sofa::helper::AdvancedTimer::stepEnd ( const char *  idStr)
static
void sofa::helper::AdvancedTimer::stepEnd ( const char *  idStr,
const char *  objStr 
)
static
void sofa::helper::AdvancedTimer::stepEnd ( const char *  idStr,
const std::string &  objStr 
)
static
template<class T >
static void sofa::helper::AdvancedTimer::stepEnd ( const char *  idStr,
T *  obj 
)
inlinestatic
void sofa::helper::AdvancedTimer::stepNext ( IdStep  prevId,
IdStep  nextId 
)
static
void sofa::helper::AdvancedTimer::stepNext ( const char *  prevIdStr,
const char *  nextIdStr 
)
static
void sofa::helper::AdvancedTimer::valAdd ( IdVal  id,
double  val 
)
static
void sofa::helper::AdvancedTimer::valAdd ( const char *  idStr,
double  val 
)
static
void sofa::helper::AdvancedTimer::valSet ( IdVal  id,
double  val 
)
static
void sofa::helper::AdvancedTimer::valSet ( const char *  idStr,
double  val 
)
static

Enum details

Enumerator
STDOUT 
LJSON 
JSON 
GUI