Skip to content

Commit

Permalink
Add a section about how to capture wgpu spans when profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
superdump committed Jul 4, 2022
1 parent 9d3c7be commit fb22d0e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/profiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

## Runtime Flame Graph: `tracing` spans

Bevy has built-in [tracing](https://github.com/tokio-rs/tracing) spans to make it cheap and easy to profile Bevy ECS systems, render logic, engine iternals, and user app code. Enable the `trace` cargo feature to enable Bevy's built-in spans. You also need to select a `tracing` backend using the following cargo features:
Bevy has built-in [tracing](https://github.com/tokio-rs/tracing) spans to make it cheap and easy to profile Bevy ECS systems, render logic, engine iternals, and user app code. Enable the `trace` cargo feature to enable Bevy's built-in spans.

If you also want to include `wgpu` tracing spans when profiling, they are emitted at the `tracing` `info` level so you will need to make sure they are not filtered out by the `LogSettings` resource's `filter` member which defaults to `wgpu=error`. You can do this by setting the `RUST_LOG=info` environment variable when running your application.

You also need to select a `tracing` backend using the following cargo features:

### Backend: trace_chrome

Expand Down

0 comments on commit fb22d0e

Please sign in to comment.