13 #ifndef ML_MODULE_PROFILING_H
14 #define ML_MODULE_PROFILING_H
17 #include <mlProfilingManager.h>
29 _profile->stopMeasuring(_handle);
33 void startMeasuring(MLMetaProfile* profile,
const std::string&
function,
int userId,
void* userData)
36 _handle = profile->startMeasuring(
function, userId, userData);
40 MLTimeProfileHandle _handle;
41 MLMetaProfile* _profile;
48 #define ML_PROFILING_SCOPE(ProfilingIdentifier) \
49 internal::ProfilingScope internal_scope; \
50 if (MLProfilingManager::isProfilingEnabled()) { \
51 MLMetaProfile* internal_metaProfile = NULL; \
52 internal_metaProfile = getMetaProfile().get(); \
53 if (internal_metaProfile) { \
54 internal_scope.startMeasuring(internal_metaProfile, ProfilingIdentifier, MLMetaProfile::MLCall, this); \
Helper class that stops measuring when it gets out of scope.
void startMeasuring(MLMetaProfile *profile, const std::string &function, int userId, void *userData)