Bug Description
When performing a request which should allow performance timing, only opaque timing info is returned.
Reproducible By
- Perform a fetch request
- Check performance timing info for that request
- See that we only get opaque timing info, with transferSize and encodedBodySize 0.
Expected Behavior
I would expect to get timing info for the request
Environment
Node v20.9.0
Additional context
This comment describes that the timingInfo should be replaced with an opaqueTimingInfo if the "response's timing allow passed flag is not set", but the code checks timingInfo.timingAllowPassed, which doesn't seem to be set anywhere.
However, the response's timingAllowPassed flag is set here.
Could it be that the code should as follows? This seems to fix my problem.
if (!response.timingAllowPassed) {
// 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo.
timingInfo = createOpaqueTimingInfo({
startTime: timingInfo.startTime
})
...
}
Bug Description
When performing a request which should allow performance timing, only opaque timing info is returned.
Reproducible By
Expected Behavior
I would expect to get timing info for the request
Environment
Node v20.9.0
Additional context
This comment describes that the timingInfo should be replaced with an opaqueTimingInfo if the "response's timing allow passed flag is not set", but the code checks
timingInfo.timingAllowPassed, which doesn't seem to be set anywhere.However, the response's timingAllowPassed flag is set here.
Could it be that the code should as follows? This seems to fix my problem.