@Chardonneaur opened this Issue on September 13th 2022

Hi guys,

A client of mine reported me the following issue, the total of the performance report for a given month on the bar graph is different than the one of the table shown below it.
hidden
Did anyone else already saw a similar issue?

@sgiehl commented on September 13th 2022 Member

Hey @Chardonneaur
This could maybe be rounding issues. The bar evolution chart simply displays a sum of all average metrics, while the average load time metric is calculated on a per visit base, summed up and divided through the number of visits.

@MatomoForumNotifications commented on September 16th 2022

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/average-page-load-time-incoherence/47384/2

@Chardonneaur commented on October 7th 2022

@sgiehl I tried to test the rounding hypothesis and to me it is not because the difference is too high.
Is there any possibility to check the calculation that Matomo is doing to perform the total of this table report?

@heurteph-ei commented on October 11th 2022

@sgiehl, I agree @Chardonneaur, even with rounding, you can't have such difference.
On the tooltip, the rounding is acceptable (and not visible): 0.2 + 1.0 + 0.08+0.93+1.09+0=3.30, on the KPI, it is not. with approximations, the maximum gap should be 0.06 (in the screenshot the difference is 0.51s, or 15%, what a huge difference!)

@sgiehl commented on October 12th 2022 Member

Those are some sort of rounding and calculation issues.
Each single performance metric is calculated by using the sum over all actions, having the metric set, divided through the count of actions.
But the overall metric is computed by summing all metrics over all actions, where one of those metrics have a value, divided through the actions.
So in theory there can be actions, that e.g. only have a transport time set. Those would then also be used for the overall metric, but would lower it's value bit more, as other metrics aren't set.
Hope that makes sense. If not I might need to explain that a bit more in detail.

@heurteph-ei commented on October 12th 2022

I think that on the same page (see Chardonneaur screenshot), you should not have 2 different values for the same thing:
image
image
All values are the same, except Total...

@Chardonneaur commented on October 14th 2022

@sgiehl @heurteph-ei thank you very much for taking the time investing in this issue, I think it is really important that an answer can be provided to the community in an FAQ or similar as the question will come on and on.

@sgiehl commented on October 14th 2022 Member

@heurteph-ei @Chardonneaur I agree that there shouldn't be two different values. I guess we actually should change the calculation of the value used for the sparkline. Otherwise it might be a bit strange that the total page load time isn't the sum of all other metrics. 🤔

Powered by GitHub Issue Mirror