-
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
core(lantern): resolve some differences when using trace #16033
Conversation
@@ -18,7 +18,6 @@ const NON_NETWORK_SCHEMES = [ | |||
]; | |||
|
|||
/** | |||
* Use `NetworkRequest.isNonNetworkRequest(req)` if working with a request. |
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.
drive by, stale comment
@@ -131,7 +126,7 @@ describe('Byte efficiency base audit', () => { | |||
}, simulator, metricComputationInput, {computedCache: new Map()}); | |||
|
|||
assert.equal(result.metricSavings.FCP, 900); | |||
assert.equal(result.metricSavings.LCP, 1350); | |||
assert.equal(result.metricSavings.LCP, 900); | |||
}); |
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.
the results changed here b/c createTestTrace is now always producing network events (not just when the env variable is true), so in the graph there is now a new dependency added from a network node to CPU node, cuz of the new ResourceSendRequest event (added in createTestTrace) linking the two (linkCPUNodes
)
redirectedRequest.url = redirect.url; | ||
redirectedRequest.parsedURL = this._createParsedUrl(redirect.url); | ||
// TODO: TraceEngine is not retaining the actual status code. | ||
redirectedRequest.statusCode = 302; | ||
redirectedRequest.resourceType = undefined; | ||
// TODO: TraceEngine is not retaining transfer size of redirected request. | ||
redirectedRequest.transferSize = 400; |
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.
Is this always the transfer size of a redirect?
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.
No, that depends on the headers sent. 400 is just exactly the size of a trace I was debugging. But otherwise it would be the size of the final response and so this avoids an overestimate for the time being.
node.record
instead ofnode.request
ref #15841