Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Command diag_captureSlowFrame #3571

Open
wants to merge 1 commit into
base: dist
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 16 additions & 34 deletions commands/diag_captureSlowFrame.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,5 @@
name: diag_captureSlowFrame
description: |-
[[File:CaptureSlowFrame.jpg|right|200x120px]]
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.
The selection names can be obtained by expanding the profiling tree. Clicking on a tree item will highlight the item on the graph and vice versa.
The GUI also provides method of copying of the displayed data to clipboard. Some of the selections:

{{{!}} class="wikitable valign-top-row-2" style="margin: 1em auto"
! Render
! Main Thread
! Visualize
! Mjob
{{!}}-
{{!}}
* bgD3D
{{!}}
* total
* memAl
{{!}}
* visul
{{!}}
* Mjob
{{!}}}

{{Feature|informative|
'''Chrome export format''':
Capturing to file also creates a .trace file, which can be imported into chrome://tracing (in chromium based webbrowsers), or https://ui.perfetto.dev/ <br>
The same format can be exported by pressing the "COPY ALL" button, in the capture frame UI, with {{Controls|Ctrl}} key being held down.
}}
description: "[[File:CaptureSlowFrame.jpg|right|200x120px]]\nOpens \"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.\nThe selection names can be obtained by expanding the profiling tree. Clicking on a tree item will highlight the item on the graph and vice versa.\nThe GUI also provides method of copying of the displayed data to clipboard. \n\n{{Feature|informative|\n'''Chrome export format''':\nCapturing to file also creates a .trace file, which can be imported into chrome://tracing (in chromium based webbrowsers), or https://ui.perfetto.dev/ <br>\nThe same format can be exported by pressing the \"COPY ALL\" button, in the capture frame UI, with {{Controls|Ctrl}} key being held down.\n}}"
groups:
- Diagnostic
- Performance Profiling
Expand All @@ -35,33 +8,39 @@ syntax:
- section
- threshold
- frameSkip
- toFile
- continuousCounter
ret:
- Nothing
- null
params:
- name: section
description: case-sensitive
type: String
type: Unknown
- name: threshold
description: section duration in seconds. 0 captures always '''IF''' the section you gave as section filter appears inside the given frame. "total" always appears, while "callExt" might not always appear for example
type: Number
type: Unknown
- name: frameSkip
description: number of frames to ignore before measuring
type: Number
optional: true
default: '0'
since:
arma_3:
major: 1
minor: 18
- name: toFile
description: 'if true, doesn''t open UI and writes straight to file. If logging to file, it automatically also outputs a .trace file. Note: even if false it might still force to file if it doesn''t have a UI, like a server or HC'
type: Boolean
optional: true
default: '[[false]]'
since:
arma_3:
major: 2
minor: 20
- name: continuousCounter
description: captures N slow frames. 0 or 1 will only capture one frame - don't set it to negative! Can be aborted by running diag_captureFrame or another captureSlowFrame
description: captures N slow frames. 0 or 1 will only capture one frame - do '''not''' set it to negative! Can be aborted by running [[diag_captureFrame]] or another [[diag_captureSlowFrame]] usage
type: Number
optional: true
default: '0'
since:
arma_3:
major: 2
Expand All @@ -80,5 +59,8 @@ since:
minor: 0
examples:
- <sqf>diag_captureSlowFrame ["total", 0.003];</sqf>
- <sqf>diag_captureSlowFrame ["total", "0.003s"];</sqf>
- <sqf>diag_captureSlowFrame ["total", "3ms"];</sqf>
- <sqf>diag_captureSlowFrame ["total", "333fps"];</sqf>
- <sqf>diag_captureSlowFrame ["memAl", 0.0001, 30];</sqf>
- <sqf>diag_captureSlowFrame ["total", 0, 0, false, 3];</sqf> Will open the capture ui 3 times
- <sqf>diag_captureSlowFrame ["total", 0, 0, false, 3]; // opens the capture UI three times</sqf>