-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
report: use acronyms and round metrics for shorter calc url #10954
Conversation
* @param {number} val | ||
* @return {number} | ||
*/ | ||
const clampTo2Decimals = val => Math.round(val * 100) / 100; |
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.
feels like we should just completely round everything but CLS
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.
ok. wonder what the chances are of this rounding resulting in an off-by-1 perf score :p
/nerdsnipe @brendankenny
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.
lol @brendankenny is this what kicked off #13316
@@ -116,10 +116,29 @@ class PerformanceCategoryRenderer extends CategoryRenderer { | |||
if (fci) v5andv6metrics.push(fci); | |||
if (fmp) v5andv6metrics.push(fmp); | |||
|
|||
/** @type {Record<string, string>} */ | |||
const acronymMapping = { |
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.
this seems like it could be useful a lot of place haha
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 would have added it to the audit meta but that had TS implications I didn't want to address.
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.
yup i think we'll eventually have to publish a module with it
lighthouse-core/report/html/renderer/performance-category-renderer.js
Outdated
Show resolved
Hide resolved
@@ -116,10 +116,29 @@ class PerformanceCategoryRenderer extends CategoryRenderer { | |||
if (fci) v5andv6metrics.push(fci); | |||
if (fmp) v5andv6metrics.push(fmp); | |||
|
|||
/** @type {Record<string, string>} */ | |||
const acronymMapping = { |
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.
yup i think we'll eventually have to publish a module with it
really wish this was like google3 where i can say LGTM but simultaneously leave "unresolved" comments. |
CI is reallllllyyyy slow what'd I tell ya :) |
related: paulirish/lh-scorecalc#21