Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix aggregation of additional action metrics #22348

Merged
merged 10 commits into from
Jul 15, 2024
Merged

Fix aggregation of additional action metrics #22348

merged 10 commits into from
Jul 15, 2024

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Jun 27, 2024

Description:

Some plugins like PagePerformance or Bandwidth are adding additional metrics to the action reports. Some of those metrics need to be aggregated using min, max or avg aggregation.

As those column aggregation where not correctly set for the datatables, they were by default aggregated by summing the values up. This resulted in incorrect values.

fixes #22350

Review

@sgiehl sgiehl force-pushed the actiontotals branch 2 times, most recently from e427762 to 036914f Compare June 28, 2024 08:02
@sgiehl sgiehl added this to the 5.2.0 milestone Jun 28, 2024
@sgiehl sgiehl added Bug For errors / faults / flaws / inconsistencies etc. Needs Review PRs that need a code review c: Data Integrity & Accuracy labels Jun 28, 2024
@sgiehl sgiehl requested a review from a team June 28, 2024 08:31
@sgiehl sgiehl marked this pull request as ready for review June 28, 2024 08:31
Copy link
Contributor

@rr-it rr-it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also check implementation of min.

core/DataTable/Row.php Show resolved Hide resolved
@sgiehl sgiehl force-pushed the actiontotals branch 3 times, most recently from 005db4d to 3fcf5a5 Compare July 1, 2024 13:32
Copy link
Contributor

@rr-it rr-it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still some values that do not look correct.

@sgiehl sgiehl force-pushed the actiontotals branch 5 times, most recently from 22748d8 to 732afac Compare July 2, 2024 20:40
@sgiehl sgiehl requested a review from a team July 8, 2024 12:25
@rr-it
Copy link
Contributor

rr-it commented Jul 8, 2024

@sgiehl Looks like this branch https://github.com/matomo-org/matomo/tree/actiontotals was accidentally overridden with some other changes:

Edit: This was just a rebase - everything looks good.

@caddoo
Copy link
Contributor

caddoo commented Jul 10, 2024

@sgiehl to help me review this, can you explain steps to reproduce.

I know in the issue you mentioned it's hard to reproduce in the UI, but can you help me with steps in the API.

Also the issue mentions the expected behavior is:
Metrics should be correctly calculated
Can you explain exactly what that means.

@sgiehl sgiehl merged commit 5863dc9 into 5.x-dev Jul 15, 2024
25 checks passed
@sgiehl sgiehl deleted the actiontotals branch July 15, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. c: Data Integrity & Accuracy Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Calculation of min/max performance metrics incorrect in aggregated reports
4 participants