tracy icon indicating copy to clipboard operation
tracy copied to clipboard

Adding a way to set a 'divisor' per zone to account for differing number of iterations of profiled loop?

Open rbnelr opened this issue 3 years ago • 0 comments

I am commonly profiling loops which vary a lot in the number of iterations during a run of my application, but which do too little work per iteration to profile the loop body itself (example: loop body is ~9ns).

I'm imagining a feature where you supply the iteration count as a divisor to the zone in a similar way to ZoneValue. Individual zone timings for the histogram could then be divided by this value before being added to a bin. (Best only optionally via a checkbox just like Cumulative time and the others)

This would make it easier to analyze the loop body performance when the number of iterations changes during a run or when comparing different runs.

Currently when comparing two runs I have to make sure that my application is as deterministic as possible else any comparisons of these zones are meaningless. A features like this could at least allow for some variation without affecting the histogram too much.

Please let me know if this makes sense to you and if it could be implemented. Thank you.

rbnelr avatar Feb 26 '21 10:02 rbnelr