16#include "GUIConfigDebug.h"
18#include "GUIComponentManager.h"
27#ifndef GUILIANI_USE_PERFMON
28#define CONTROLPOINTSTART(cp);
29#define CONTROLPOINTEND(cp);
30#define CONTROLPOINTPERFMEASURE();
34#define GETPERFMON CGUIComponentManager::GetPerfMon()
38#define CONTROLPOINTSTART(cp) GETPERFMON.ControlPointStart(cp);
42#define CONTROLPOINTEND(cp) GETPERFMON.ControlPointEnd(cp);
45#define CONTROLPOINTPERFMEASURE() GETPERFMON.CalcPerfMeasures();
146 enum PerfMonControlPoint_t
173 static const eC_UInt kNumOfAvailableUserEntries = eRequiredSpace;
183 typedef void(*PerfMonCallback_t)(eC_UInt*, eC_Int);
188 static void CreateInstance();
192 static void DeleteInstance();
199 void ControlPointStart(PerfMonControlPoint_t eCP)
201 m_StartCP[eCP] = eC_GetTicks64();
209 void ControlPointEnd(PerfMonControlPoint_t eCP)
211 m_SumCP[eCP] = m_SumCP[eCP] + (eC_GetTicks64() - m_StartCP[eCP]);
217 void CalcPerfMeasures();
224 void SetNumOfUserEntries(eC_UInt uiNumOfUserEntries);
229 eC_UInt GetNumOfUserEntries() {
return m_uiNumOfUsedUserEntries; }
237 void SetCountLog(eC_Bool bCountLog) { m_bCountLog = bCountLog; }
244 void SetCyclesPerLog(eC_UInt uiCyclesPerLog) { m_uiCyclesPerLog = uiCyclesPerLog; }
250 void Enable() { m_bActive =
true; }
253 void Disable() { m_bActive =
false; }
258 void SetLogMode(
const LogMode_t eLogMode) { m_eLogMode = eLogMode; }
264 void SetCallback(PerfMonCallback_t pCallback) { m_pCallback = pCallback; }
270 void SetFileHandle(FILE* pFileHandle) { m_pFileHandle = pFileHandle; }
278 virtual ~CGUIPerfMon();
282 CGUIPerfMon(
const CGUIPerfMon& kSource);
286 CGUIPerfMon& operator=(
const CGUIPerfMon& kSource);
289 eC_UInt GetNumOfEntries();
292 void WriteToFile(
const eC_String& rkTraceString);
295 static CGUIPerfMon* ms_pkInstance;
297 eC_Time64 m_StartCP[eNumOfElements];
298 eC_Time64 m_EndCP[eNumOfElements];
299 eC_Time64 m_SumCP[eNumOfElements];
300 eC_UInt m_CountCP[eNumOfElements];
302 eC_UInt m_uiNumOfUsedUserEntries;
305 eC_Bool m_bWriteLogFile;
307 eC_UInt m_uiCyclesPerLog;
308 eC_UInt m_uiCycleCount;
312 LogMode_t m_eLogMode;
316 PerfMonCallback_t m_pCallback;
317 eC_UInt* m_pCallbackValues;
central component-manager
Definition: GUIComponentManager.h:62