DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ Enable()

static proto void EnProfiler::Enable ( bool enable,
bool immediate = false,
bool sessionReset = true )
staticprivate

Enable the gathering of script profiling data.

Заметки
DEFAULT: disabled (unless launched with "-profile", then it is default enabled)
This is separate from the one in [DM], so toggling it in [DM] will not affect this, and toggling it here will not affect [DM]
It will ignore the call if trying to set the current state, except when "immediate" is used
Аргументы
enablebool Whether to enable or disable, if it was previously not enabled, it will cause [SR]
Заметки
Disabling does not cause [SR], so all data will stay intact
Аргументы
immediatebool When true will instantly start/stop profiling, otherwise it will apply it at the end of the frame (to have one stable point in time)
Предупреждения
Keep in mind that when using immediate, it will not be the data of the entire frame, which can skew data if not kept in mind
Аргументы
sessionResetbool When set to false, no [SR] will trigger, regardless of situation
// Simple enable, will start profiling the next frame
// Will cause [SR] if !IsEnabledP() before this call
// Immediate enable, will start profiling immediately
// Will cause [SR] if !IsEnabledP() before this call
EnProfiler.Enable(true, true);
// Immediate disable, will stop profiling immediately
// Disabling will never cause [SR], preserving data
EnProfiler.Enable(false, true);
// Simple disable, will not profile the next frame (but still finish profiling the current one)
// Disabling will never cause [SR], preserving data
Set of methods for accessing script profiling data.
Определения EnProfiler.c:73
static proto void Enable(bool enable, bool immediate=false, bool sessionReset=true)
Enable the gathering of script profiling data.

Используется в RequestImmediateData(), EnProfilerTests::TestClassCountData(), EnProfilerTests::TestClassTimeData(), EnProfilerTests::TestFuncCountData(), EnProfilerTests::TestFuncTimeData(), EnProfilerTests::TestModule(), EnProfilerTests::TestToggling(), EnProfilerTests::TestTogglingImmediate() и EnProfilerTests::~EnProfilerTests().