y2kappa/timed

Add Stats

y2kappa opened this issue · 0 comments

I'd really like to know some of these stats:

  • how many times a function was called
  • how much % that function is compared to the total time of execution

This would really help to explain which functions will benefit most from optimizations.

This should be done during:

pub fn dump(id: &str, processor: fn(&str), stats: &TracingStats) {
//
    match stats {
            TracingStats::None => {}
            TracingStats::Percentage => {}
    }
//

I had an initial attempt at this but did not have the time.

You can freely choose what stats methods should be there:

  • summary of top 5/10 by time, by number of calls
  • full detail of everything
  • the longest running function