-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Apply sanity caps on outlier values in performance reports #20718
Apply sanity caps on outlier values in performance reports #20718
Conversation
7d9da13
to
902745b
Compare
Hi @rr-it, This PR introduces some sort of maximal values for the performance metrics that are used in calculations. Is that correct? |
@sgiehl That's perfectly correct. Please also see my latest comment on #17847: |
Devices, especially iPhones, sometimes send insane high performance values which don't make any sense. Without this PR
With this PR
|
7a28d51
to
87e09b0
Compare
If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'. |
@sgiehl Please add label 'Do not close'. |
This issue is in "needs review" but there has been no activity for 7 days. ping @matomo-org/core-reviewers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a comment. Otherwise the code looks fine to me.
But someone from product team should maybe have a look here first. ping @Stan-vw
I'm not 100% sure regarding the implementation/solution.
With cutting away values if they are too high I see some possible:
- Only removing too high values, but not also too low values might let look the values better than they are
- The default values for the config values might be inaccurate as some pages might expect higher loading times than others.
- The most accurate solution might be to simply throw away the top 1% and bottom 1% of values and only calculate with the rest. This would be a lot more complex to implement and maybe also slower when archiving, though.
If we plan to include that, guess we would need to update our documentation & faqs accordingly.
This issue is in "needs review" but there has been no activity for 7 days. ping @matomo-org/core-reviewers |
The business logic still needs to be resolved (whether we do fixed values, top and bottom percentage or something else). There's also a merge conflict now which needs to be resolved, plus a change request from Stefan. I've removed the Needs review tag for now until all the above is addressed at which point it can be marked as Needs review again. |
87e09b0
to
7198b36
Compare
On the business logic - most points were already mentioned:
Without this PRNo outliers
Top outlier
Bottom outlier
|
@Stan-vw I guess it's your call on whether we should accept this as is or you want any adjustments. |
7198b36
to
3ae9905
Compare
@michalkleiner it's been ages since we discussed this so I could be wrong, but I believe we agreed to merge this without front end configuration option for now. I'm actually surprised to see it's still open rather than merged, what part is not mergable yet? |
@sgiehl You merged branch '5.x-dev' into If you like I can revert this merge and instead rebase my changes onto branch '5.x-dev'. And then do a force push of this newly created branch for Done: I proceeded as described above. |
6d06413
to
27e6b66
Compare
The following code throws WARNING/NOTICE in "Matomo Tests / UI (0-3)": try {
$valueCap = Config::getInstance()->PagePerformance[$this->columnName . '_cap_' . $this->type];
} catch (Exception $ex) {
// 0 disables cap
return 0;
} The WARNING/NOTICE is like:
How do you correctly call |
On runs of "Matomo Tests / UI (0-3)" the php-log does not become cluttered anymore with PHP The added @sgiehl Now I think this PR is ready to merge. |
If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'. |
3ecf11d
to
1a959c8
Compare
1a959c8
to
8cf7ca2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for not coming back earlier on this one. I would suggest to update the configuration slightly. Otherwise this imho should look good. We could though consider to add some tests around that, to ensure it works correctly.
Co-authored-by: Michal Kleiner <[email protected]>
Having the lines commented out will hide the from the configuration overview page in Matomo. Providing a default value of 0 will show them there and make that possibility a bit more visible. Co-authored-by: Stefan Giehl <[email protected]>
4b797e1
to
08764d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a simple integration test now to cover the value capping in a test. Imho this should be good to merge now. We might need to update the config ui test after merging though
); | ||
} | ||
|
||
public function testShouldNotCapOutlinerValuesWhenConfigured() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sgiehl should this be called testShouldCapOutlinerValuesWhenConfigured()
without the 'not'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed
Description:
The values used in performance reports of type 'sum/total' and 'average' are capped to reduce the impact of single failed performance measurements.
This fixes #17847.
Review