StopStackRootProfiling - Debug

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: Debug Script

Stops profiling all stacks that start in the specified script (and optionally object).

Syntax[edit | edit source]

Function StopStackRootProfiling(string asScriptName, ScriptObject akObj = None) native global debugOnly

Parameters[edit | edit source]

  • asScriptName: The name of the script to stop profiling.
  • akObj: The object to limit the profiling to. Passing None does not remove all profiling roots for a particular script, it will only remove the 'all' profiling request if one was made.
    • Default: None

Return Value[edit | edit source]

None.

Examples[edit | edit source]

; Stops profiling all stacks that start in MySlowScript (unless a filtered one remains)
Debug.StopStackRootProfiling("MySlowScript")


; Stops profiling all stacks that start in MySlowScript, but only on MyObj
; Will have no effect if MyObj was not being filtered already
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.
  • 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 not currently profiled nothing will change.
  • Profiling requests are not saved and will be reset if you load a save game.

See Also[edit | edit source]