StartStackRootProfiling - Debug
Member of: Debug Script
Starts profiling all stacks that start in the specified script (and optionally object). Calls into said script from outside scripts are NOT profiled.
SyntaxEdit
Function StartStackRootProfiling(string asScriptName, ScriptObject akObj = None) native global debugOnly
ParametersEdit
- asScriptName: The name of the script to start profiling.
- akObj: The object to limit the profiling to. If None, will profile all instances of the script in the game.
- Default: None
Return ValueEdit
None.
ExamplesEdit
; Starts profiling all stacks that start in MySlowScript
Debug.StartStackRootProfiling("MySlowScript")
; Starts profiling all stacks that start in MySlowScript, but only on MyObj
Debug.StartStackRootProfiling("MySlowScript", MyObj)
NotesEdit
- Profiling requires the "bEnableProfiling" flag in the "[Papyrus]" section of the ini file to be set to 1.
- This is effectively the same as adding StartStackProfiling to every event in your script (except it will start profiling the stack before the event starts).
- The profile files are stored in "<documents>/My Games/Fallout4/Logs/Script/Profiling".
- This will also cycle the older profiling logs (so log 0 becomes 1, 1 becomes 2, etc).
- If the stack root is already profiled nothing will change.
- Profiling requests are not saved and will be reset if you load a save game.