Contains makVrv::DtStatsSet class.
More...
Go to the source code of this file.
Macros |
| #define | DT_DECLARE_STATS_SET(name, id, stats_elements) |
| | Helper macro for creating DtStatsSets with an enum to index the contents.
|
| #define | DT_STATSSET_QUOTE(x) #x |
| #define | DT_STATSSET_ENUM(r, name, elem) BOOST_PP_CAT(timer, BOOST_PP_CAT(_, BOOST_PP_CAT(name, BOOST_PP_CAT(_, elem)))), |
| #define | DT_STATSSET_ADD(r, stats_set_ptr, elem) stats_set_ptr->addStats(DT_STATSSET_QUOTE(elem)); |
| #define | DT_STATSSET_DECLARE_ENUM(name, seq) enum TimerStats_##name { BOOST_PP_SEQ_FOR_EACH(DT_STATSSET_ENUM, name, seq) timer_##name##_end}; |
| #define | DT_SCOPED_STAT_TIMER(stats_element, stats_set_id, stats_set_ref) 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.
|
Detailed Description
Macro Definition Documentation
| #define DT_DECLARE_STATS_SET |
( |
|
name, |
|
|
|
id, |
|
|
|
stats_elements |
|
) |
| |
Value:
\
{\
static bool guard = false;\
id##_statsSet->myName = name;\
mgr.add(name, id##_statsSet);\
}\
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.
| #define DT_STATSSET_QUOTE |
( |
|
x | ) |
#x |
| #define DT_STATSSET_ENUM |
( |
|
r, |
|
|
|
name, |
|
|
|
elem |
|
) |
| BOOST_PP_CAT(timer, BOOST_PP_CAT(_, BOOST_PP_CAT(name, BOOST_PP_CAT(_, elem)))), |
| #define DT_STATSSET_ADD |
( |
|
r, |
|
|
|
stats_set_ptr, |
|
|
|
elem |
|
) |
| stats_set_ptr->addStats(DT_STATSSET_QUOTE(elem)); |
| #define DT_STATSSET_DECLARE_ENUM |
( |
|
name, |
|
|
|
seq |
|
) |
| enum TimerStats_##name { BOOST_PP_SEQ_FOR_EACH(DT_STATSSET_ENUM, name, seq) timer_##name##_end}; |
| #define DT_SCOPED_STAT_TIMER |
( |
|
stats_element, |
|
|
|
stats_set_id, |
|
|
|
stats_set_ref |
|
) |
| 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.