-
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
fix: better debug message for missing network times #2451
Conversation
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.
awesome stuff.
@@ -38,6 +36,10 @@ class NetworkThroughput extends ComputedArtifact { | |||
return boundaries; | |||
}, []).sort((a, b) => a.time - b.time); | |||
|
|||
if (!timeBoundaries.length) { |
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.
can you document this in the jsdoc?
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.
done
@@ -193,6 +193,12 @@ class CategoryRenderer { | |||
const descriptionEl = this._dom.createChildOf(element, 'div', 'lh-perf-hint__description'); | |||
descriptionEl.appendChild(this._dom.convertMarkdownLinkSnippets(audit.result.helpText)); | |||
|
|||
if (audit.result.debugString) { |
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.
what is this adding that wasn't there before? Not clear from the screenshot
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.
it was, but not if it didn't completely fail (this was sort of drive by, there are other debugStrings that can be set)
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.
added a test now for it
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.
it was, but not if it didn't completely fail
it was...what? :P
@@ -85,7 +85,7 @@ describe('Byte efficiency base audit', () => { | |||
{wastedBytes: 450, totalBytes: 1000, wastedPercent: 50}, | |||
{wastedBytes: 400, totalBytes: 450, wastedPercent: 50}, | |||
], | |||
}); | |||
}, 1000); |
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.
need new tests, too
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.
done
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.
a new test in network-throughput-test.js
to replicate what was coming in from chrome://
URLs would be good too, but otherwise LGTM
done |
travis is greeeeeen |
Improves the debug information when network throughput can't be computed and defaults the result to Infinity instead of 0 which makes more sense since the only use of networkThroughput is to be the divisor (the computed artifact is also used by total byte weight which makes sense to say 0 ms time and still report the byte savings)
This was affecting chrome URLs which don't have any timing information, results from before and after for
chrome://version
below (the optimized images error is for tainting canvas which apparently all chrome images do)Before
After