bsc-performance-tools / wxparaver

wxParaver is a trace-based visualization and analysis tool designed to study quantitative detailed metrics and obtain qualitative knowledge of the performance of applications, libraries, processors and whole architectures.
http://tools.bsc.es/paraver
GNU Lesser General Public License v2.1
26 stars 3 forks source link

Misleading histogram average: ignores columns with nulls #9

Open rodarima opened 1 year ago

rodarima commented 1 year ago

When computing the aggregate statistics of an histogram showing the "% Time", the Average statistic is computed differently when there are no states for that object:

bad-histogram

You can see that the states 1 and 2 show the same value in Total and Average but not for 3. The "% Time" in the state 0 and 1 in CPU 0.1 should be 0 % not "-" (presumably null), so the Average values are divided by 2 instead of by 1.

I am unable to find any option to make Paraver show a 0 instead of converting it to null but I'm suspicious that this behavior is not intended in any case anyway.

Additionally, catching this with a large number of objects will be hard for the naked eye (when showing the totals only). As safety, could you also add the N being used to draw the average and the other statistics?

rodarima commented 1 year ago

Here is a simple reproducer with the following trace:

#Paraver (19/01/38 at 03:14):00000000000000100_ns:0:1:1(2:1)
2:0:1:1:1:00:36:1
2:0:1:1:1:50:36:2
2:0:1:1:2:00:36:1

And here are the timeline and histogram:

bad-average

paraver-null-histogram-average.tar.gz