15#ifndef ML_PROFILING_MANAGER_H
16#define ML_PROFILING_MANAGER_H
33#define MLPROFILINGMANAGER_GLOBAL_LOCK() ml::RecursiveLock profilingManagerLock(MLProfilingManager::globalMutex());
84 ~MLProfilingManager();
92 std::vector<MLMetaProfile*> _metaProfiles;
96 bool _isProfilingEnabled;
97 bool _isTimeProfilingGraphEnabled;
99 static MLProfilingManager* _singleton;
111 return ML_NAMESPACE::TimeCounter().getCurrentValueInSeconds();
static void setTimeProfilingGraphEnabled(bool enabled)
Sets whether the time profiling graph is enabled.
static bool isProfilingEnabled()
Returns whether profiling is enabled.
friend class MLMetaProfilePtr
static void disableTracing()
Disables call tracing.
friend class MLMetaProfile
static void initialize()
Initializes the singleton.
static void setProfilingEnabled(bool enabled)
Sets whether profiling is enabled.
static std::string byteToHumanReadable(size_t bytes)
Converts the number of bytes into a human-readable representation.
static bool isTracingEnabled()
Returns whether call tracing is enabled.
static void enableTracing(const char *filename)
Enables call tracing and set the trace filname.
static double getCurrentTime()
Returns the current time in seconds.
static ml::RecursiveMutex & globalMutex()
Returns 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 whether the time profiling graph is enabled.
boost::recursive_mutex RecursiveMutex
#define MLPROFILINGMANAGER_EXPORT