StartStackRootProfiling - Debug
Revision as of 16:32, 1 December 2015 by imported>Plplecuyer
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.
Syntax[edit | edit source]
Function StartStackRootProfiling(string asScriptName, ScriptObject akObj = None) native global debugOnly
Parameters[edit | edit source]
- 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 Value[edit | edit source]
None.
Examples[edit | edit source]
; 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)
Notes[edit | edit source]
- 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.