tracel-ai/burn

Add a `burn-profiler` crate to evaluate performances

Open

#1,265 opened on Feb 5, 2024

View on GitHub
 (6 comments) (0 reactions) (0 assignees)Rust (964 forks)auto 404
featuregood first issue

Repository metrics

Stars
 (15,550 stars)
PR merge metrics
 (PR metrics pending)

Description

Feature description

Besed on the bevy-log crate, the burn-profiler crate must be able to evaluate function performances and detect where the hotspots could be localized. The crate should also provide APIs to allow spans creation. A span is used to measure specific code portions and bevy profiling section can be an example:

{
  // creates a span and starts the timer
  let my_span = info_span!("span_name", name = "span_name").entered();
  do_something_here();
} // my_span is dropped here ... this stops the timer

The crate should also implement APIs to interact with external profilers such as the Tracy Profiler Trace.

Roadmap:

  • 1. Add burn-profiler spans APIs
  • 2. Document how to use these APIs in the Contributor book
  • 3. Verify if those APIs work in an async context
  • 4. Evaluate whether those APIs can work in a no_std environment

Feature motivation

Evaluating whether there are functions and methods which consumes a great amount of resources in terms of memory and computation

Contributor guide