tracel-ai/burn

Add a `burn-profiler` crate to evaluate performances

Aperta

#1265 aperta il 5 feb 2024

 (6 commenti) (0 reazioni) (0 assegnatari)Rust (964 fork)auto 404
featuregood first issue

Metriche repository

Star
 (15.550 stelle)
Metriche merge PR
 (Merge medio 2g 22h) (129 PR mergiate in 30 g)

Descrizione

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

Guida contributor