| 6 | const { performance } = require('perf_hooks'); |
| 7 | |
| 8 | function createTimingInfo(startTime) { |
| 9 | const timingInfo = { |
| 10 | startTime: startTime, |
| 11 | endTime: startTime, |
| 12 | finalServiceWorkerStartTime: 0, |
| 13 | redirectStartTime: 0, |
| 14 | redirectEndTime: 0, |
| 15 | postRedirectStartTime: 0, |
| 16 | finalConnectionTimingInfo: { |
| 17 | domainLookupStartTime: 0, |
| 18 | domainLookupEndTime: 0, |
| 19 | connectionStartTime: 0, |
| 20 | connectionEndTime: 0, |
| 21 | secureConnectionStartTime: 0, |
| 22 | ALPNNegotiatedProtocol: 0, |
| 23 | }, |
| 24 | finalNetworkRequestStartTime: 0, |
| 25 | finalNetworkResponseStartTime: 0, |
| 26 | encodedBodySize: 0, |
| 27 | decodedBodySize: 0, |
| 28 | }; |
| 29 | return timingInfo; |
| 30 | } |
| 31 | const requestedUrl = 'https://nodejs.org'; |
| 32 | const initiatorType = ''; |
| 33 | const cacheMode = ''; |