fix(har): WebSocket message timestamps should be in milliseconds#41364
Conversation
| this._timestampBaselineForWebSocket.set(event.requestId, wallTimeMs - event.timestamp); | ||
| this._page!.frameManager.onWebSocketRequest(event.requestId, headersObjectToArray(event.request.headers, '\n'), wallTimeMs); | ||
| this._timestampBaselineForWebSocket.set(event.requestId, event.wallTime - event.timestamp); | ||
| this._page!.frameManager.onWebSocketRequest(event.requestId, headersObjectToArray(event.request.headers, '\n'), event.wallTime); |
There was a problem hiding this comment.
FrameManager.onWebSocketRequest receives wallTimeMs, but event.wallTime is time since epoch in seconds in chromium. Shouldn't the units match?
There was a problem hiding this comment.
oh shoot good catch! yes i make sure this is not affected by the fix
fc7a0bd to
3b2fd77
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| _onWebSocketWillSendHandshakeRequest(event: Protocol.Network.webSocketWillSendHandshakeRequestPayload) { | ||
| const wallTimeMs = event.walltime * 1000; | ||
| this._timestampBaselineForWebSocket.set(event.requestId, wallTimeMs - event.timestamp); | ||
| this._timestampBaselineForWebSocket.set(event.requestId, wallTimeMs - (event.timestamp * 1000)); |
There was a problem hiding this comment.
nit drop braces
| this._timestampBaselineForWebSocket.set(event.requestId, wallTimeMs - (event.timestamp * 1000)); | |
| this._timestampBaselineForWebSocket.set(event.requestId, wallTimeMs - event.timestamp * 1000); |
There was a problem hiding this comment.
i personally like the extra clarity just in case, but if this is our style then i can follow :)
the `timestamp` should also be multipled by 1000 just like the `walltime`
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Test results for "MCP"7354 passed, 1122 skipped Merge workflow run. |
Test results for "tests 1"Warning The triggering workflow run ended with status 5 flaky35083 passed, 583 skipped Merge workflow run. |
…be in milliseconds the `timestamp` should also be multipled by 1000 just like the `walltime` fixes <#41360>
the
timestampshould also be multipled by 1000 just like thewalltimefixes #41360