15#ifndef ML_PROFILING_MANAGER_H
16#define ML_PROFILING_MANAGER_H
33#define MLPROFILINGMANAGER_GLOBAL_LOCK() ml::RecursiveLock profilingManagerLock(MLProfilingManager::globalMutex());
68 static inline double getCurrentTime();
92 std::vector<MLMetaProfile*> _metaProfiles;
96 bool _isProfilingEnabled;
97 bool _isTimeProfilingGraphEnabled;
111 return ML_NAMESPACE::TimeCounter().getCurrentValueInSeconds();
static void setTimeProfilingGraphEnabled(bool enabled)
Sets if the time profiling graph is enabled.
static bool isProfilingEnabled()
Returns if profiling is enabled.
static void disableTracing()
Disables call tracing.
static void initialize()
Initializes the singleton.
static void setProfilingEnabled(bool enabled)
Sets if profiling is enabled.
static std::string byteToHumanReadable(size_t bytes)
Converts the number of bytes into a human readable representation.
static bool isTracingEnabled()
Returns if call tracing is enabled.
static void enableTracing(const char *filename)
Enable call tracing and set the trace filname.
static double getCurrentTime()
Returns the current time in seconds.
static ml::RecursiveMutex & globalMutex()
Get access to the global recursive mutex of the profiling.
static void resetAllProfilingData()
Resets all profiling data.
static std::string timeToHumanReadable(double time)
Converts the time into a human readable representation.
static void deinitialize()
Destroys the singleton.
static bool isTimeProfilingGraphEnabled()
Returns if the time profiling graph is enabled.
boost::recursive_mutex RecursiveMutex
Defines a recursive mutex.
#define MLPROFILINGMANAGER_EXPORT
Target mlrange_cast(Source arg)
Generic version of checked ML casts.