13#ifndef ML_MODULE_PROFILING_H
14#define ML_MODULE_PROFILING_H
29 _profile->stopMeasuring(_handle);
36 _handle =
profile->startMeasuring(function,
userId, userData);
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)
Target mlrange_cast(Source arg)
Generic version of checked ML casts.