267 for (
int i = 0;
i < 1000; ++
i)
275 Debug.
TFLog(
"Game fncs:",
this,
"TestModule");
281 Debug.
TFLog(
string.Format(
" time: %1 | fnc: %2",
tfp.param1,
tfp.param2),
this,
"TestModule");
283 if (!
Assert(
tfp.param2 !=
"EnumTools::StringToEnum"))
338 Debug.
TFLog(
"Core fncs:",
this,
"TestModule");
344 Debug.
TFLog(
string.Format(
" time: %1 | fnc: %2",
tfpc.param1,
tfpc.param2),
this,
"TestModule");
346 if (
tfpc.param2 ==
"EnumTools::StringToEnum")
519 GetGame().GameScript.CallFunction(
this,
"TestFuncCountDataHelper",
null, 0);
526 GetGame().GameScript.CallFunctionParams(
this,
"TestFuncCountDataHelper",
null,
null);
540 GetGame().GameScript.Call(
this,
"TestFuncCountDataHelper", 0);
664 for (
int i = 0;
i < 1000; ++
i)
665 string example =
string.Format(
"This %1 is %2 just %3 an %4 example %5",
i,
Type(),
this,
startTime,
"lorem ipsum 1 2 3");
676 for (
int i = 0;
i < 1000; ++
i)
677 string example =
"This " +
i +
" is " +
Type() +
" just " +
this +
" an " +
startTime +
" example " +
"lorem ipsum 1 2 3";
float SleepAgain(float timeS)
EnProfilerTests TestFramework Sleep2(float timeS)
TFResult NTFR(TFR result)
bool Assert(bool condition)
void TFResult(TFR result)
void AddInitTest(string test)
TFResult BTFR(bool result)
static void TFLog(string message=LOG_DEFAULT, TestFramework caller=null, string function="")
Set of methods for accessing script profiling data.
TFResult TestFuncCountData()
TFResult TestClearFlags()
void TestFuncCountDataHelper()
bool m_bWasProfilerEnabled
Remember this, so we can restore the previous state before the test!
TFResult TestTogglingImmediate()
TFResult TestClassTimeData()
static void TestFuncCountDataHelperStatic()
TFResult TestClassCountData()
TFResult TestFuncTimeData()
The error handler itself, for managing and distributing errors to modules Manages the ErrorHandlerMod...
static proto native ErrorModuleHandler GetInstance()
Gets the EMH Instance.
proto native CGame GetGame()
static proto float AbsFloat(float f)
Returns absolute value.
static proto int GetTimeResolution()
Get the currently set time resolution.
static proto EnProfilerModule GetModule()
Get the currently profiled module.
static proto void GetTimePerFunc(notnull out array< ref EnProfilerTimeFuncPair > outArr, int count=int.MAX)
Obtain [SD] for Time Per Function.
static proto int GetAllocationsOfClass(typename clss, bool immediate=false)
Obtain [SD] or [PD] regarding the allocations of a specific class.
static proto float GetTimeOfClass(typename clss, bool immediate=false)
Obtain [SD] or [PD] regarding the time a specific class consumed.
static proto int GetCountOfFunc(string funct, typename clss, bool immediate=false)
Obtain [SD] or [PD] regarding the amount of times a specific function was called.
static proto int GetFlags()
Get the currently used flags across the API.
static proto int ClearFlags(bool sessionReset=true)
Remove all flags from the currently used set of EnProfilerFlags across the API.
static proto float GetTimeOfFunc(string funct, typename clss, bool immediate=false)
Obtain [SD] or [PD] regarding the time consumed by a specific function.
static proto void SetTimeResolution(int resolution)
Set the resolution of the fetched Time data.
static proto void SortData()
The internal sorting that happens at the end of the frame (so it is NOT necessary to call this manual...
static proto void SetModule(EnProfilerModule module, bool sessionReset=true)
Set the module to be profiled.
static proto void ResetSession(bool fullReset=false)
Perform [SR], clearing SessionFrame, ProfiledSessionFrames, [SD] and [PD] (except for [CI])
static bool IsEnabledP()
Return if script profiling is enabled through EnProfiler.
static bool IsEnabledC()
Return if script profiling is actually turned on inside of the script context.
static proto int GetInstancesOfClass(typename clss, bool immediate=false)
Obtain [SD] or [PD] regarding the [CI] of a specific class.
EnProfilerFlags
Flags that influences the behaviour of the EnProfiler API, applied through ...Flags functions.
static proto void GetTimePerClass(notnull out array< ref EnProfilerTimeClassPair > outArr, int count=int.MAX)
Obtain [SD] for Time Per Class.
static proto int SetFlags(int flags, bool sessionReset=true)
Override the currently used set of EnProfilerFlags across the API.
static proto void Enable(bool enable, bool immediate=false, bool sessionReset=true)
Enable the gathering of script profiling data.
EnProfilerModule
Current base scripted modules.
static proto bool NameToModule(string moduleName, out EnProfilerModule module)
Convert string to EnProfilerModule.
static bool RequestImmediateData()
Helper method to ascertain the profiler will record [PD] right after this call.
static proto int RemoveFlags(int flags, bool sessionReset=true)
Remove flags from the currently used set of EnProfilerFlags across the API.
static proto int GetCountOfFuncG(string funct, bool immediate=false)
Obtain [SD] or [PD] regarding the amount of times a specific function was called.
static proto int AddFlags(int flags, bool sessionReset=true)
Add flags to the currently used set of EnProfilerFlags across the API.