Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
enprofiler.c
Go to the documentation of this file.
1
19
38
54
57
60
73{
103 static proto void Enable(bool enable, bool immediate = false, bool sessionReset = true);
104
114 static proto int IsEnabled();
115
124 static bool IsEnabledD()
125 {
126 return (IsEnabled() & EnProfilerEnabledFlags.DIAG);
127 }
128
138 static bool IsEnabledP()
139 {
140 return (IsEnabled() & EnProfilerEnabledFlags.SCRP);
141 }
142
152 static bool IsEnabledC()
153 {
154 return (IsEnabled() & EnProfilerEnabledFlags.SCRC);
155 }
156
172 static proto void SortData();
173
193 static proto void ResetSession(bool fullReset = false);
194
195
196
201
223 static proto int SetFlags(int flags, bool sessionReset = true);
224
238 static proto int GetFlags();
239
258 static proto bool IsFlagsSet(int flags);
259
276 static proto int AddFlags(int flags, bool sessionReset = true);
277
294 static proto int RemoveFlags(int flags, bool sessionReset = true);
295
311 static proto int ClearFlags(bool sessionReset = true);
312
314
315
316
321
333 static proto void SetModule(EnProfilerModule module, bool sessionReset = true);
334
343 static proto EnProfilerModule GetModule();
344
354 static proto owned string ModuleToName(EnProfilerModule module);
355
378 static proto bool NameToModule(string moduleName, out EnProfilerModule module);
379
381
382
383
398 static proto void SetInterval(int interval, bool sessionReset = true);
399
408 static proto int GetInterval();
409
410
411
427 static proto void SetTimeResolution(int resolution);
428
437 static proto int GetTimeResolution();
438
439
440
463 static proto void EnableAverage(bool enable);
464
473 static proto bool IsAverage();
474
475
476
484 static proto void Dump();
485
486
487
492
501 static proto int GetGameFrame();
502
512 static proto int GetSessionFrame();
513
523 static proto int GetTotalFrames();
524
534 static proto int GetProfiledSessionFrames();
535
545 static proto int GetProfiledFrames();
546
548
549
550
557
574 static proto void GetTimePerClass(notnull out array<ref EnProfilerTimeClassPair> outArr, int count = int.MAX);
575
586 static proto void GetAllocationsPerClass(notnull out array<ref EnProfilerCountClassPair> outArr, int count = int.MAX);
587
598 static proto void GetInstancesPerClass(notnull out array<ref EnProfilerCountClassPair> outArr, int count = int.MAX);
599
610 static proto void GetTimePerFunc(notnull out array<ref EnProfilerTimeFuncPair> outArr, int count = int.MAX);
611
622 static proto void GetCountPerFunc(notnull out array<ref EnProfilerCountFuncPair> outArr, int count = int.MAX);
623
625
626
627
632
652 static proto float GetTimeOfClass(typename clss, bool immediate = false);
653
664 static proto int GetAllocationsOfClass(typename clss, bool immediate = false);
665
676 static proto int GetInstancesOfClass(typename clss, bool immediate = false);
677
689 static proto float GetTimeOfFunc(string funct, typename clss, bool immediate = false);
690
701 static proto float GetTimeOfFuncG(string funct, bool immediate = false);
702
714 static proto int GetCountOfFunc(string funct, typename clss, bool immediate = false);
715
726 static proto int GetCountOfFuncG(string funct, bool immediate = false);
727
729
730
731
736
745 static bool RequestImmediateData()
746 {
747 // I only care if it is actually profiling right now, so C
748 bool wasEnabled = IsEnabledC();
749
750 if (!wasEnabled)
751 {
752 // I want the data, and I want it now, so immediate
753 Enable(true, true);
754 }
755
756 return wasEnabled;
757 }
758
760};
761
Set of methods for accessing script profiling data.
Definition enprofiler.c:73
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
const int MAX
Definition enconvert.c:27
Param2< int, string > EnProfilerCountFuncPair
Definition enprofiler.c:59
Param2< float, string > EnProfilerTimeFuncPair
Definition enprofiler.c:58
Param2< int, typename > EnProfilerCountClassPair
Definition enprofiler.c:56
EnProfilerEnabledFlags
There are 3 states which can be toggled that governs whether script profiling is enabled or not.
Definition enprofiler.c:44
Param2< float, typename > EnProfilerTimeClassPair
Definition enprofiler.c:55
EnProfilerFlags
Flags that influences the behaviour of the EnProfiler API, applied through ...Flags functions.
Definition enprofiler.c:9
EnProfilerModule
Current base scripted modules.
Definition enprofiler.c:22
@ DIAG
Script profiling UI is enabled in WIN+ALT debug menu, when this is true, it will override SCRP.
Definition enprofiler.c:48
@ SCRP
It has been set to being always enabled through EnProfiler (SCRipt Profiler)
Definition enprofiler.c:50
@ NONE
No flags.
Definition enprofiler.c:11
@ SCRC
Whether profiling is currently truly happening (SCRipt Context)
Definition enprofiler.c:52
@ RECURSIVE
Whether to profile child modules.
Definition enprofiler.c:15
@ RESET
When present, will reset [PD] on sorting, otherwise will accumulate on top of it.
Definition enprofiler.c:13
@ ALL
All flags enabled.
Definition enprofiler.c:17
@ ERROR
Can be returned from some methods.
Definition enprofiler.c:36
@ WORLD
4_World
Definition enprofiler.c:30
@ CORE
1_Core
Definition enprofiler.c:24
@ GAMELIB
2_GameLib
Definition enprofiler.c:26
@ MISSION_CUSTOM
init.c
Definition enprofiler.c:34
@ GAME
3_Game
Definition enprofiler.c:28
@ MISSION
5_Mission
Definition enprofiler.c:32
proto native bool IsEnabled()
Enabled flag getter.