VR-Vantage
Loading...
Searching...
No Matches
DtStatsSet.h File Reference

Contains makVrv::DtStatsSet class. More...

Go to the source code of this file.

Classes

struct  makVrv::DtTimeStat
 Definition of a names set of timing samples. More...
class  makVrv::DtStatsSet
 Set of performance statistics for display. More...
class  makVrv::ScopedStatTimer

Namespaces

namespace  makVrv
 Contains DtCreateSensorFieldOfViewCommand and DtCreateSensorFieldOfViewCommandCreator class declarations.

Macros

#define DT_DECLARE_STATS_SET(name, id, stats_elements)
#define DT_STATSSET_QUOTE(x)
#define DT_STATSSET_ENUM(r, name, elem)
#define DT_STATSSET_ADD(r, stats_set_ptr, elem)
#define DT_STATSSET_DECLARE_ENUM(name, seq)
#define DT_SCOPED_STAT_TIMER(stats_element, stats_set_id, stats_set_ref)

Detailed Description

Contains makVrv::DtStatsSet class.

Macro Definition Documentation

◆ DT_DECLARE_STATS_SET

#define DT_DECLARE_STATS_SET ( name,
id,
stats_elements )
Value:
DT_STATSSET_DECLARE_ENUM(id, stats_elements)\
\
{\
static bool guard = false;\
guard = true;\
makVrv::DtStatsSet* id##_statsSet = new makVrv::DtStatsSet();\
id##_statsSet->myName = name;\
BOOST_PP_SEQ_FOR_EACH(DT_STATSSET_ADD, id##_statsSet, stats_elements)\
mgr.add(name, id##_statsSet);\
}\
#define DT_STATSSET_ADD(r, stats_set_ptr, elem)
Definition DtStatsSet.h:53
#define DT_STATSSET_DECLARE_ENUM(name, seq)
Definition DtStatsSet.h:54
Manager for sets of performance stats.
Definition DtPerformanceStatsManager.h:29
Set of performance statistics for display.
Definition DtStatsSet.h:66
DT_DLL_EXAMPLEACCESSORY void init(makVrv::DtDe &de)

Helper macro for creating DtStatsSets with an enum to index the contents

Takes a display name for the new stats set, an identifier to name the stats enumeration, and a list of the stats items. Declares a stats set initialization function named init#id##Stats (with #id## replaced by the passed in id) that must be called before using the stats set with a reference to a DtPerformanceStatsManager.

For example, to create a stats set to time methods "foo" and "bar" of the class MyClass, you might call: DT_DECLARE_STATS_SET("MyClass Stats", MyClass, (foo)(bar)) and then initialize the set by calling initMyClassStats(DtPerformanceStatsManager::instance(de));

See examplePerformanceStats for sample usage.

◆ DT_STATSSET_QUOTE

#define DT_STATSSET_QUOTE ( x)
Value:
#x

◆ DT_STATSSET_ENUM

#define DT_STATSSET_ENUM ( r,
name,
elem )
Value:
BOOST_PP_CAT(timer, BOOST_PP_CAT(_, BOOST_PP_CAT(name, BOOST_PP_CAT(_, elem)))),

◆ DT_STATSSET_ADD

#define DT_STATSSET_ADD ( r,
stats_set_ptr,
elem )
Value:
stats_set_ptr->addStats(DT_STATSSET_QUOTE(elem));
#define DT_STATSSET_QUOTE(x)
Definition DtStatsSet.h:51

◆ DT_STATSSET_DECLARE_ENUM

#define DT_STATSSET_DECLARE_ENUM ( name,
seq )
Value:
enum TimerStats_##name { BOOST_PP_SEQ_FOR_EACH(DT_STATSSET_ENUM, name, seq) timer_##name##_end};
#define DT_STATSSET_ENUM(r, name, elem)
Definition DtStatsSet.h:52

◆ DT_SCOPED_STAT_TIMER

#define DT_SCOPED_STAT_TIMER ( stats_element,
stats_set_id,
stats_set_ref )
Value:
ScopedStatTimer scopedStatTimer_##stats_element(timer_##stats_set_id##_##stats_element, stats_set_ref)

Helper macro for creating ScopedStatTimer objects for a DtStatsSet created with the DT_DECLARE_STATS_SET macro