-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Aggregate stat service #9757
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
Aggregate stat service #9757
Conversation
Codecov Report
@@ Coverage Diff @@
## features #9757 +/- ##
==============================================
+ Coverage 39.67% 39.70% +0.02%
- Complexity 33978 34163 +185
==============================================
Files 1989 2016 +27
Lines 105731 106275 +544
==============================================
+ Hits 41951 42192 +241
- Misses 63780 64083 +303
|
@alanhartless can you point the lines with dispatcher again? Now does not show the right lines |
@kuzmany updated |
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 checked the code and looks very nice. I also made some basic tests on emails stats and works properly.
I'm exited to see it in core.
Unit test included.
Count Acquia use it in production.
Then we can merge it :
…r methods for now
…ek format methods
update phpdoc year Co-Authored-By: galvani <galvani78@gmail.com>
Co-Authored-By: galvani <galvani78@gmail.com>
Co-Authored-By: galvani <galvani78@gmail.com>
Co-Authored-By: galvani <galvani78@gmail.com>
Deleting file in "unit" to be re-added under "Unit" (aggravating case insensitive filesystem)
3f36d4e
to
fdac857
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.
Based on the +1 from @kuzmany and that Acquia has this in production, LGTM! 🚀
This adds the service to use a new event to collect stats to allow 3rd party to manage and inject stats. The email graph's TEMPLATE graph has been rewritten to use it. Note that a lot of the statistic collection for the email was refactored into individual classes an are not necessarily part of the example for how to use the service.
(Note this PR is a blocker to Acquia contributing a number of PRs as code changed depends on this code).
https://github.com/mautic/mautic/pull/9757/files#diff-a9a319bd79a694d0b73f80b6ceb80b383601bd77b0d943890d35eb5275f1d6b8R65 demonstrates how to dispatch a request to collect a specific set of stats (by hour) and formats it for whatever its purpose is. In this case, it's the data for chart.js.
https://github.com/mautic/mautic/pull/9757/files#diff-20b8dee755b891bca4995d9bfe8f2d065b0ec8577261fda99bc1fec627eea70dR44 listens to the event dispatched by the collector service.
https://github.com/mautic/mautic/pull/9757/files#diff-a9a319bd79a694d0b73f80b6ceb80b383601bd77b0d943890d35eb5275f1d6b8R145 injects the stats into the StatCollection.
To test this PR for the email graph,