-
-
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] - Enable wgpu profiling spans when using bevy's trace feature #5182
Conversation
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 think this should be a separate feature from Bevy tracing.
People will often be interested in tracing to profile their system, not always to profile their GPU usage. Ideally we should be able to do both independently
In that case I want to rename the wgpu_trace feature to wgpu_api_trace (because it enables a feature that traces the wgpu api calls for debug and replay purposes) and call this new feature for enabling profiling tracing trace_wgpu for consistency with our other trace_* features. Sound ok @mockersf ? |
I was wondering - are spans enabled depending on the log level of the emitting crate? If that's the case, reusing the feature would be fine, it would just need more docs, something like: "if you want to see your system spans, set this log level, if you want wgpu spans, set this level, if you want both ..." Otherwise, the feature renaming sounds good! |
Yes, spans are enabled based on the log level defined at the span creation site. The So, I will roll back the changes to the default log filter, and instead add documentation about using |
@mockersf I have added documentation into |
bors r+ |
# Objective - Enable `wgpu` profiling spans ## Solution - `wgpu` uses the `profiling` crate to add profiling span instrumentation to their code - `profiling` offers multiple 'backends' for profiling, including `tracing` - When the `bevy` `trace` feature is used, add the `profiling` crate with its `profile-with-tracing` feature to enable appropriate profiling spans in `wgpu` using `tracing` which fits nicely into our infrastructure - Bump our default `tracing` subscriber filter to `wgpu=info` from `wgpu=error` so that the profiling spans are not filtered out as they are created at the `info` level. --- ## Changelog - Added: `tracing` profiling support for `wgpu` when using bevy's `trace` feature - Changed: The default `tracing` filter statement for `wgpu` has been changed from the `error` level to the `info` level to not filter out the wgpu profiling spans
# 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
…ne#5182) # Objective - Enable `wgpu` profiling spans ## Solution - `wgpu` uses the `profiling` crate to add profiling span instrumentation to their code - `profiling` offers multiple 'backends' for profiling, including `tracing` - When the `bevy` `trace` feature is used, add the `profiling` crate with its `profile-with-tracing` feature to enable appropriate profiling spans in `wgpu` using `tracing` which fits nicely into our infrastructure - Bump our default `tracing` subscriber filter to `wgpu=info` from `wgpu=error` so that the profiling spans are not filtered out as they are created at the `info` level. --- ## Changelog - Added: `tracing` profiling support for `wgpu` when using bevy's `trace` feature - Changed: The default `tracing` filter statement for `wgpu` has been changed from the `error` level to the `info` level to not filter out the wgpu profiling spans
# 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
…ne#5182) # Objective - Enable `wgpu` profiling spans ## Solution - `wgpu` uses the `profiling` crate to add profiling span instrumentation to their code - `profiling` offers multiple 'backends' for profiling, including `tracing` - When the `bevy` `trace` feature is used, add the `profiling` crate with its `profile-with-tracing` feature to enable appropriate profiling spans in `wgpu` using `tracing` which fits nicely into our infrastructure - Bump our default `tracing` subscriber filter to `wgpu=info` from `wgpu=error` so that the profiling spans are not filtered out as they are created at the `info` level. --- ## Changelog - Added: `tracing` profiling support for `wgpu` when using bevy's `trace` feature - Changed: The default `tracing` filter statement for `wgpu` has been changed from the `error` level to the `info` level to not filter out the wgpu profiling spans
# 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
…ne#5182) # Objective - Enable `wgpu` profiling spans ## Solution - `wgpu` uses the `profiling` crate to add profiling span instrumentation to their code - `profiling` offers multiple 'backends' for profiling, including `tracing` - When the `bevy` `trace` feature is used, add the `profiling` crate with its `profile-with-tracing` feature to enable appropriate profiling spans in `wgpu` using `tracing` which fits nicely into our infrastructure - Bump our default `tracing` subscriber filter to `wgpu=info` from `wgpu=error` so that the profiling spans are not filtered out as they are created at the `info` level. --- ## Changelog - Added: `tracing` profiling support for `wgpu` when using bevy's `trace` feature - Changed: The default `tracing` filter statement for `wgpu` has been changed from the `error` level to the `info` level to not filter out the wgpu profiling spans
# 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
wgpu
profiling spansSolution
wgpu
uses theprofiling
crate to add profiling span instrumentation to their codeprofiling
offers multiple 'backends' for profiling, includingtracing
bevy
trace
feature is used, add theprofiling
crate with itsprofile-with-tracing
feature to enable appropriate profiling spans inwgpu
usingtracing
which fits nicely into our infrastructuretracing
subscriber filter towgpu=info
fromwgpu=error
so that the profiling spans are not filtered out as they are created at theinfo
level.Changelog
tracing
profiling support forwgpu
when using bevy'strace
featuretracing
filter statement forwgpu
has been changed from theerror
level to theinfo
level to not filter out the wgpu profiling spans