-
Notifications
You must be signed in to change notification settings - Fork 223
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 #7170 Fonts download data measurement #7173
base: feature/host-google-fonts
Are you sure you want to change the base?
Closes #7170 Fonts download data measurement #7173
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 |
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.
Minor changes/questions
|
||
++$count_fonts; | ||
|
||
Logger::debug( "Font download duration -- $download_time", [ 'Host Fonts Locally' ] ); |
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 think having the font url here will make it easier for the support team to know which one is taking that much time, what do u think?
@@ -118,6 +132,8 @@ public function write_font_css( string $font_url, string $provider ): bool { | |||
|
|||
// Add for test purpose. | |||
Logger::debug( "Font download and optimization duration in seconds -- $duration", [ 'Host Fonts Locally' ] ); | |||
Logger::debug( "Number of fonts downloaded -- $count_fonts", [ 'Host Fonts Locally' ] ); |
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.
Also can we add the main CSS file url that those metrics are related?
Description
Fixes #7170
Type of change
Detailed scenario
With rocket debug log enabled, load a page. Data will be available in the log:
Technical description
Documentation
Count the number of fonts downloaded in each CSS files. Measure the download time for each font. Use those values to generate an average download time per CSS file.
Mandatory Checklist
Code validation
Code style
Unticked items justification
No tests to add