Simple Engine profiling #7

Closed
opened 2024-03-23 14:49:32 +00:00 by SeanOMik · 1 comment
Owner

The engine is already using tracing as a logging library, however it can also be used as an instrumentation tool.

The plan I have is to use the #[instrument] proc-macro in more places in the engine, and manually create spans wherever they are needed. There is a great tool called Tracy that can be used to view the profile. The tracing_tracy library is required to collect Tracy profiles from tracing instrumentation. There's also clippy-tracing that can be used to add the instrument attribute to all functions automatically.

The engine is already using [tracing](https://github.com/tokio-rs/tracing) as a logging library, however it can also be used as an instrumentation tool. The plan I have is to use the `#[instrument]` proc-macro in more places in the engine, and manually create spans wherever they are needed. There is a great tool called [Tracy](https://github.com/wolfpld/tracy) that can be used to view the profile. The [tracing_tracy](https://github.com/nagisa/rust_tracy_client) library is required to collect Tracy profiles from tracing instrumentation. There's also [clippy-tracing](https://crates.io/crates/clippy-tracing) that can be used to add the instrument attribute to all functions automatically.
SeanOMik added the
Kind/Feature
label 2024-03-23 14:49:32 +00:00
SeanOMik changed title from Profiling the engine using Tracing to Engine profiling 2024-03-23 14:49:48 +00:00
SeanOMik changed title from Engine profiling to Simple Engine profiling 2024-04-24 22:30:04 +00:00
Author
Owner

The profiling tools above have been implemented and tested. They work great. It will take some time to profile the entire engine, each portion can be instrumented when each part is being worked on. I think its safe to close this, even if the entire engine isn't profiled.

The profiling tools above have been implemented and tested. They work great. It will take some time to profile the entire engine, each portion can be instrumented when each part is being worked on. I think its safe to close this, even if the *entire* engine isn't profiled.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: SeanOMik/lyra-engine#7
No description provided.