Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-add the "frame" span for tracy comparisons (#8362)
# Objective In #6503 there were two changes to the top level tracing span "frame. Firstly it was renamed to "main app" and secondly the scope was reduced to *only* the main app. This means that there is no longer a top level span that can be used to compare frame times. In addition to making it easier to compare across versions again, it also helps when running without the render feature. Previously the "frame" span was present in both cases but now to compare "headless" and render the comparison is between "main app" and "winit event_handler" and Tracy doesn't handle comparing non-matching frames well. Before (0.9) ![image](https://user-images.githubusercontent.com/1353401/231454801-5690fb40-f9c1-4c64-b7b3-cebb15f1d16a.png) After (0.10) ![image](https://user-images.githubusercontent.com/1353401/231454926-df76e7d3-b5fa-49bc-a56c-67301d2a9e8a.png) ## Solution This PR reintroduces the "frame" span so comparisons across versions and features is again easy. ![image](https://user-images.githubusercontent.com/1353401/231455114-94f86d22-64de-48fc-9a0f-a5c607d3f350.png) ![image](https://user-images.githubusercontent.com/1353401/231455182-fe27a646-b55e-4bfb-8e05-c4690f52c550.png) ### Alternative As an alternative route, the `tracy-client` crate that is used by `tracing-tracy` supports the ability to set multiple "Frame" markers using the `secondary_mark_frame` function. It may be possible to create a PR for `tracing-tracy` that exposes that functionality and then publish an "update" frame marker instead. This might have additional benefits in the future as it could be used for other systems we might want to track as frames without endless nesting.
- Loading branch information