Skip to content

Commit

Permalink
add comment about connect
Browse files Browse the repository at this point in the history
  • Loading branch information
Skn0tt committed Sep 16, 2024
1 parent c0c036b commit 9479423
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/playwright-core/src/server/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,13 @@ export abstract class APIRequestContext extends SdkObject {

const request = requestConstructor(url, requestOptions as any, async response => {
const notifyRequestFinished = (body?: Buffer) => {
// spec: http://www.softwareishard.com/blog/har-12-spec/#timings
const timings: har.Timings = {
send: requestFinishAt! - startAt,
wait: firstByteAt! - requestFinishAt!,
receive: endAt! - firstByteAt!,
dns: dnsLookupAt ? dnsLookupAt - startAt : -1,
connect: (tlsHandshakeAt ?? tcpConnectionAt!) - startAt,
connect: (tlsHandshakeAt ?? tcpConnectionAt!) - startAt, // "If [ssl] is defined then the time is also included in the connect field "
ssl: tlsHandshakeAt ? tlsHandshakeAt - tcpConnectionAt! : -1,
blocked: -1,
};
Expand Down

0 comments on commit 9479423

Please sign in to comment.