-
Notifications
You must be signed in to change notification settings - Fork 225
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
Closes #7161: Host Google Fonts - Measure time #7163
Closes #7161: Host Google Fonts - Measure time #7163
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
cc @piotrbak @DahmaniAdame This PR should allow you to further investigate timing of the feature if you want. |
5be349b
to
07f9ca3
Compare
Update status of this PR:This pull request introduces changes to the Performance measurement and logging:
|
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.
Thank you, @Miraeld, for this PR.
We can now see measurements in logs for duration & fonts processed:
FYI, @DahmaniAdame & @piotrbak
…n-time-mesurement
The count You are basically counting how many items are on this array:
It will always return 1. What needs to be counted is how many font URL are on the font CSS file referred to on |
Also, to get a meaningful result, we need to show on the logs an average loading time per font. Basically |
Description
Fixes #7161
Nothing will impact the user.
Type of change
Detailed scenario
No special scenario, just enable the feature host google font and load a page. Within WP Rocket debug file you'll find the execution time logged.
Technical description
Documentation
This pull request introduces performance measurement and logging for the
rewrite_fonts
method in theFrontend/Controller.php
file. The most important changes include adding start and end time measurements and logging the total execution time for the method.Performance measurement and logging:
inc/Engine/Media/Fonts/Frontend/Controller.php
: Added start time measurement at the beginning of therewrite_fonts
method for test purposes.inc/Engine/Media/Fonts/Frontend/Controller.php
: Added end time measurement and logged the total execution time for therewrite_fonts
method.New dependencies
None
Risks
None
Mandatory Checklist
Code validation
Code style
Unticked items justification
No tests required for this tasks.