13#ifndef ML_MODULE_PROFILING_H
14#define ML_MODULE_PROFILING_H
33 _profile->stopMeasuring(_handle);
40 _handle =
profile->startMeasuring(function,
userId, userData);
52#define ML_PROFILING_SCOPE(ProfilingIdentifier) \
53 internal::ProfilingScope internal_scope; \
54 if (MLProfilingManager::isProfilingEnabled()) { \
55 MLMetaProfile* internal_metaProfile = NULL; \
56 internal_metaProfile = getMetaProfile().get(); \
57 if (internal_metaProfile) { \
58 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.