Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
enprofiler.c
Go to the documentation of this file.
1 
9 {
18 };
19 
22 {
37 };
38 
44 {
46  NONE,
53 };
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, 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 
Param2
Definition: ppeconstants.c:66
GAMELIB
@ GAMELIB
2_GameLib
Definition: enprofiler.c:26
EnProfilerModule
EnProfilerModule
Current base scripted modules.
Definition: enprofiler.c:21
CORE
@ CORE
1_Core
Definition: enprofiler.c:24
EnProfilerTimeFuncPair
Param2< float, string > EnProfilerTimeFuncPair
Definition: enprofiler.c:58
SCRP
@ SCRP
It has been set to being always enabled through EnProfiler (SCRipt Profiler)
Definition: enprofiler.c:50
EnProfilerEnabledFlags
EnProfilerEnabledFlags
There are 3 states which can be toggled that governs whether script profiling is enabled or not.
Definition: enprofiler.c:43
EnProfilerFlags
EnProfilerFlags
Flags that influences the behaviour of the EnProfiler API, applied through ...Flags functions.
Definition: enprofiler.c:8
ERROR
@ ERROR
Can be returned from some methods.
Definition: enprofiler.c:36
RECURSIVE
@ RECURSIVE
Whether to profile child modules.
Definition: enprofiler.c:15
RESET
@ RESET
When present, will reset [PD] on sorting, otherwise will accumulate on top of it.
Definition: enprofiler.c:13
Enable
proto native void Enable(bool enable)
EnProfilerCountFuncPair
Param2< int, string > EnProfilerCountFuncPair
Definition: enprofiler.c:59
ALL
@ ALL
All flags enabled.
Definition: enprofiler.c:17
EnProfilerCountClassPair
Param2< int, typename > EnProfilerCountClassPair
Definition: enprofiler.c:56
array
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Definition: isboxcollidinggeometryproxyclasses.c:27
NONE
@ NONE
No flags.
Definition: enprofiler.c:11
EnProfiler
Set of methods for accessing script profiling data.
Definition: enprofiler.c:72
SCRC
@ SCRC
Whether profiling is currently truly happening (SCRipt Context)
Definition: enprofiler.c:52
MISSION
@ MISSION
5_Mission
Definition: enprofiler.c:32
WORLD
@ WORLD
4_World
Definition: enprofiler.c:30
EnProfilerTimeClassPair
Param2< float, typename > EnProfilerTimeClassPair
Definition: enprofiler.c:55
MAX
const int MAX
Definition: enconvert.c:27
MISSION_CUSTOM
@ MISSION_CUSTOM
init.c
Definition: enprofiler.c:34
GAME
@ GAME
3_Game
Definition: enprofiler.c:28
DIAG
@ DIAG
Script profiling UI is enabled in WIN+ALT debug menu, when this is true, it will override SCRP.
Definition: enprofiler.c:48