profiler icon indicating copy to clipboard operation
profiler copied to clipboard

Allow to toggle between showing samples and millisecond durations in call tree

Open parttimenerd opened this issue 1 year ago • 2 comments

Durations in milliseconds (even if they only approximate the real time) are easier to understand than the concept of samples (especially if you are not proficient in using sampling profilers). I therefore propose to add the possibility to switch the sample counts to durations in the call tree (and associated view). An example of what this can look like is: Sample tree view with durations instead of samples

I'm happy to implement this feature.

parttimenerd avatar Aug 26 '22 09:08 parttimenerd

We were using ms instead of samples initially, and found that this was misleading to our users, that's why we moved to samples. We believed that being closer to the actual data was better.

We do approximate to milliseconds in the stack chart, by merging nearby samples that have the same stack, "hovering" any existing holes because of missing samples. This isn't perfect either but this makes sense in this context.

I don't think adding a checkbox (cluttering the already busy UI) to switch this is a good idea, but I'm open to other ways to teach our users that a sample approximatively means an interval value (which BTW isn't likely true for small sample counts but statistically truer for larger sample counts).

julienw avatar Aug 30 '22 12:08 julienw

Thanks for the explanation. I see these problems too, it just came up in a related discussion.

It would probably help, if we could use tooltips that tell what a sample is and probably also tooltips that give an approximation of the run time. This does not clutter the UI but gives inexperienced users a way to understand the values.

parttimenerd avatar Aug 30 '22 13:08 parttimenerd