# Performance Profiling (scripting commands)

- [diag_captureFrame](../../commands/diag_captureFrame.md): This command starts counting frames from the moment it is executed and when the count reaches the number passed as param, the current frame is captured and captured data UI dialog appears, similar to…
- [diag_captureFrameToFile](../../commands/diag_captureFrameToFile.md): This command starts counting frames from the moment it is executed and when the count reaches the number passed as param, the current frame is captured and written to a log file in the same directory as the .rpt file.
- [diag_captureSlowFrame](../../commands/diag_captureSlowFrame.md): Opens "capture frame" dialog if current frame exceeds set threshold in seconds. One can indicate to either capture duration of a specific profiling selection or the total duration of the frame.
- [diag_codePerformance](../../commands/diag_codePerformance.md): Attempts to run given code with given arguments given number of cycles in unscheduled environment and returns average time it took to run the code as well as actual number of executions performed.
- [diag_fps](../../commands/diag_fps.md): Returns average framerate calculated over last 16 frames.
- [diag_fpsMin](../../commands/diag_fpsMin.md): Returns minimal framerate. Calculated from the longest frame over last 16 frames.
- [diag_frameNo](../../commands/diag_frameNo.md): Returns number of frame currently displayed.
- [diag_scope](../../commands/diag_scope.md): Returns script scope depth. When script is directly executed by the engine or a new script is added to the scheduler, the scope depth is 0. The examples of such execution are event handlers, spawn, etc.
- [diag_testScriptSimpleVM](../../commands/diag_testScriptSimpleVM.md): Outputs the provided SQF code's end code.
