-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Merged by Bors] - docs: Add section about using Tracy for profiling #4534
Conversation
docs/profiling.md
Outdated
|
||
There are binaries available for Windows, and installation / build instructions for other operating systems can be found in the [Tracy documentation PDF](https://github.com/wolfpld/tracy/releases/latest/download/tracy.pdf). | ||
|
||
It has a command line capture tool that can be used for capturing with minimal disruption to the execution of graphical applications, saving the profile data to a file. It also has a GUI that can be used to inspect these profile files, or live capture them, though running the live capture on the same machine will be a competing graphical application, which may impact results. As such, @superdump tends to use the command line to for capturing, and the GUI tool for inspecting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please line break your .md paragraphs; it makes for cleaner git changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree for text because then I end up re-joining and re-splitting all the lines whenever any words change, which creates a lot of noise. If they are on one line, in GitHub's UI only the changed words are highlighted. Plus none of the other existing paragraphs in this document are split across multiple lines. I won't resist on this point if you want us to consistently split paragraphs onto multiple lines in documentation though as I respect your ownership of docs more than my own opinions on it. :)
docs/profiling.md
Outdated
|
||
There are binaries available for Windows, and installation / build instructions for other operating systems can be found in the [Tracy documentation PDF](https://github.com/wolfpld/tracy/releases/latest/download/tracy.pdf). | ||
|
||
It has a command line capture tool that can be used for capturing with minimal disruption to the execution of graphical applications, saving the profile data to a file. It also has a GUI that can be used to inspect these profile files, or live capture them, though running the live capture on the same machine will be a competing graphical application, which may impact results. As such, @superdump tends to use the command line to for capturing, and the GUI tool for inspecting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "capturing" mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll clarify this, but it means 'receiving and recording profile data.' The Tracy tool is called 'capture'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like nicopap's rewording already makes this much clearer so I left it as-is after their change was committed. Let me know if you think it needs further clarification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits, but I'll block on the explicit mention of your username :)
I'm very glad to have this; seems extremely useful.
This is still blocked on the username mention i assume? i ended up referring people to this PR multiple times by now, and would really appreciate it taken care of soon. |
Just needs the author (@superdump) to clean up a couple of the nits. @laundmo if you're feeling up for it feel free to make a competing version of this with the fixes and we can merge that ASAP. |
I can update it sometime before the end of the week. |
Co-authored-by: Nicola Papale <nicopap@users.noreply.github.com>
Co-authored-by: Nicola Papale <nicopap@users.noreply.github.com>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
This now provides information that depends on #5182 |
bors try |
tryBuild failed: |
bors try |
tryBuild failed: |
Pffft flakey link checker. |
well...
|
Aha. I looked at the big bold red ERRORs starting at the top and saw the failure to get a GitHub token and I thought it was only the dead link check in markdown that used that.
Given other PRs were passing and I saw the GitHub token failure that I have seen so many times before, I figured it was temporarily failing. The boy who cried wolf. :)
Righto, I missed those lines because despite being important information, they are not highlighted in red. 😄 I'll fix them. |
Tests pass when you read, see, understand, and fix the errors that they report! \o/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've used this recently as a reference for #4240. I think a future PR could add a couple things:
- Add a section about comparing two traces with tracy
- Add a link to the
tracing-tracy
crate here for example, especially the table at the end of the README with the version matrix, and state the version used in bevy, so that the reader can at a glance know which tracy version to use.
is it good to postpone that? speaking from experience it can lead to a lot of frustration... |
It's better to keep PRs small. I'll spin those off into new issues. bors r+ |
# Objective - Document how to do profiling with Tracy # Solution - The documentation of setting `RUST_LOG=info` in order to capture `wgpu` spans depends on #5182
# Objective - Document how to do profiling with Tracy # Solution - The documentation of setting `RUST_LOG=info` in order to capture `wgpu` spans depends on bevyengine#5182
# Objective - Document how to do profiling with Tracy # Solution - The documentation of setting `RUST_LOG=info` in order to capture `wgpu` spans depends on bevyengine#5182
# Objective - Document how to do profiling with Tracy # Solution - The documentation of setting `RUST_LOG=info` in order to capture `wgpu` spans depends on bevyengine#5182
Objective
Solution
RUST_LOG=info
in order to capturewgpu
spans depends on [Merged by Bors] - Enable wgpu profiling spans when using bevy's trace feature #5182