Skip to content
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(network-analyzer): include 0 start times in rtt estimate #15100

Merged
merged 2 commits into from Jun 12, 2023

Conversation

connorjclark
Copy link
Collaborator

@connorjclark connorjclark commented May 20, 2023

image

There are many requests in the lantern database with a connectStart of zero. For example, in lantern-data/https---www-cnet-com--mobile-unthrottled-5-devtoolsLog.json. All of these requests also have a dnsStart of 0 (by necessity), though not all requests with a dnsStart of 0 also have a connectStart of 0.

From cnet.com:

  • request 7921.127 was a redirect - the original request has a non-zero dns/connection start time. The second request is the 0 one. The second request is ignore in the rtt estimation because the connection is marked as re-used.
  • request 7921.105 tracking pixel, not a redirect. I can only guess that Chrome just happened to already connect to this origin recently (maybe from a subframe?), though it is not reflected in the logs.

From https://en-maktoob.yahoo.com/?p=xa:

  • request 19743.2 connectStart AND sslStart are both zero (connectStart: 0, connectEnd: 10.374, sslStart: 0, sslEnd: 10.362). It's a h2 request, so it's unclear what this actually means. Surely doing a TCP or a SSL handshake takes more than <1ms, so I think we can assume this represents just a single roundtrip of connection time.

(btw, this is a good link)

@connorjclark connorjclark requested a review from a team as a code owner May 20, 2023 00:52
@connorjclark connorjclark requested review from adamraine and removed request for a team May 20, 2023 00:52
@adamraine adamraine changed the title core(network-analyzer): do not exclude zero start times in rtt estimate core(network-analyzer): include zero start times in rtt estimate May 22, 2023
@brendankenny
Copy link
Member

These seem like good assumptions, but can you capture a netlog of one of these cases so we can resolve some of these questions? Ideally future investigations of RTT estimating can terminate here rather than continuing up blame.

@connorjclark
Copy link
Collaborator Author

connorjclark commented May 22, 2023

Here's a netlog and dt log of cnet.com https://gist.github.com/connorjclark/3b85c1e06667beed53fb0ef27123c987

url https://pixel.tapad.com/idsync/ex/receive?partner_id=APPNEXUS&partner_device_id=1400146762626694345&pt=c0b0432c-64e8-4f10-b286-5ed2d7f9ec9d%2C%2C req id 31618.5 has timing of "dnsStart":0,"dnsEnd":0,"connectStart":0,"connectEnd":18.122,"sslStart":0,"sslEnd":18.119

Search for tapad in the netlog, and you see there are two connections open for that domain (same site and cross site).

Every request to that domain:

{"method":"Network.requestWillBeSent","params":{"requestId":"31581.102","loaderId":"4A72DC93BD5B2F1FC2732BD4C4E1A232","documentURL":"https://www.cnet.com/","request":{"url":"https://pixel.tapad.com/idsync/ex/receive?partner_id=3185&partner_device_id=AU1D-0100-001684779540-S135AXKT-AZHU&partner_url=https://ids.ad.gt%2Fapi%2Fv1%2Ftapad_match%3Fid%3DAU1D-0100-001684779540-S135AXKT-AZHU%26tapad_id%3D%24%7BTA_DEVICE_ID%7D","method":"GET","headers":{"sec-ch-ua":"\"Chromium\";v=\"109\", \"Google Chrome\";v=\"109\", \"Lighthouse\";v=\"10.2.0\"","Referer":"https://www.cnet.com/","sec-ch-ua-mobile":"?1","User-Agent":"Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36","sec-ch-ua-platform":"\"Android\""},"mixedContentType":"none","initialPriority":"Low","referrerPolicy":"no-referrer-when-downgrade","isSameSite":false},"timestamp":53867.332187,"wallTime":1684779539.878556,"initiator":{"type":"script","stack":{"callFrames":[],"parent":{"description":"Image","callFrames":[{"functionName":"imgSrcToElement","scriptId":"66","url":"https://a.ad.gt/api/v1/u/matches/489?url=https%3A%2F%2Fwww.cnet.com%2F&ref=","lineNumber":36,"columnNumber":16},{"functionName":"setupCookieSync","scriptId":"66","url":"https://a.ad.gt/api/v1/u/matches/489?url=https%3A%2F%2Fwww.cnet.com%2F&ref=","lineNumber":139,"columnNumber":28},{"functionName":"processData","scriptId":"66","url":"https://a.ad.gt/api/v1/u/matches/489?url=https%3A%2F%2Fwww.cnet.com%2F&ref=","lineNumber":191,"columnNumber":8},{"functionName":"onConsent","scriptId":"66","url":"https://a.ad.gt/api/v1/u/matches/489?url=https%3A%2F%2Fwww.cnet.com%2F&ref=","lineNumber":229,"columnNumber":12},{"functionName":"","scriptId":"66","url":"https://a.ad.gt/api/v1/u/matches/489?url=https%3A%2F%2Fwww.cnet.com%2F&ref=","lineNumber":241,"columnNumber":4},{"functionName":"","scriptId":"66","url":"https://a.ad.gt/api/v1/u/matches/489?url=https%3A%2F%2Fwww.cnet.com%2F&ref=","lineNumber":243,"columnNumber":1}]}}},"redirectHasExtraInfo":false,"type":"Image","frameId":"02FC76DD83EC140C804E9EBB0F2F7C62","hasUserGesture":false},"targetType":"page","sessionId":"EBFE6CF6852CFE9E269254DD9B5E0C34"},
{"method":"Network.requestWillBeSent","params":{"requestId":"31581.102","loaderId":"4A72DC93BD5B2F1FC2732BD4C4E1A232","documentURL":"https://www.cnet.com/","request":{"url":"https://pixel.tapad.com/idsync/ex/receive/check?partner_id=3185&partner_device_id=AU1D-0100-001684779540-S135AXKT-AZHU&partner_url=https://ids.ad.gt%2Fapi%2Fv1%2Ftapad_match%3Fid%3DAU1D-0100-001684779540-S135AXKT-AZHU%26tapad_id%3D%24%7BTA_DEVICE_ID%7D","method":"GET","headers":{"Referer":"https://www.cnet.com/","User-Agent":"Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36"},"mixedContentType":"none","initialPriority":"Low","referrerPolicy":"no-referrer-when-downgrade","isSameSite":false},"timestamp":53867.573105,"wallTime":1684779540.119505,"initiator":{"type":"parser","url":"https://www.cnet.com/","lineNumber":707,"columnNumber":1},"redirectHasExtraInfo":true,"redirectResponse":{"url":"https://pixel.tapad.com/idsync/ex/receive?partner_id=3185&partner_device_id=AU1D-0100-001684779540-S135AXKT-AZHU&partner_url=https://ids.ad.gt%2Fapi%2Fv1%2Ftapad_match%3Fid%3DAU1D-0100-001684779540-S135AXKT-AZHU%26tapad_id%3D%24%7BTA_DEVICE_ID%7D","status":302,"statusText":"","headers":{"date":"Mon, 22 May 2023 18:18:59 GMT","strict-transport-security":"max-age=31536000","via":"1.1 google","accept-ch":"Sec-CH-UA, Sec-CH-UA-Arch, Sec-CH-UA-Bitness, Sec-CH-UA-Full-Version-List, Sec-CH-UA-Mobile, Sec-CH-UA-Model, Sec-CH-UA-Platform, Sec-CH-UA-Platform-Version, Sec-CH-UA-WoW64","p3p":"policyref=\"http://tapad-taptags.s3.amazonaws.com/policy/p3p.xml\", CP=\"NOI DSP COR ADM PSAo PSDo OURo SAMo UNRo OTRo BUS COM NAV DEM STA PRE\"","access-control-allow-origin":"*","location":"https://pixel.tapad.com/idsync/ex/receive/check?partner_id=3185&partner_device_id=AU1D-0100-001684779540-S135AXKT-AZHU&partner_url=https://ids.ad.gt%2Fapi%2Fv1%2Ftapad_match%3Fid%3DAU1D-0100-001684779540-S135AXKT-AZHU%26tapad_id%3D%24%7BTA_DEVICE_ID%7D","alt-svc":"h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000","content-length":"0"},"mimeType":"","connectionReused":false,"connectionId":483,"remoteIPAddress":"[64:ff9b::226f:713e]","remotePort":443,"fromDiskCache":false,"fromServiceWorker":false,"fromPrefetchCache":false,"encodedDataLength":746,"timing":{"requestTime":53867.332605,"proxyStart":-1,"proxyEnd":-1,"dnsStart":0.656,"dnsEnd":69.37,"connectStart":69.37,"connectEnd":81.895,"sslStart":73.217,"sslEnd":81.892,"workerStart":-1,"workerReady":-1,"workerFetchStart":-1,"workerRespondWithSettled":-1,"sendStart":82.128,"sendEnd":82.319,"pushStart":0,"pushEnd":0,"receiveHeadersEnd":99.906},"responseTime":1684779539978.809,"protocol":"h2","alternateProtocolUsage":"unspecifiedReason","securityState":"secure","securityDetails":{"protocol":"TLS 1.3","keyExchange":"","keyExchangeGroup":"X25519","cipher":"AES_128_GCM","certificateId":0,"subjectName":"*.tapad.com","sanList":["*.tapad.com","tapad.com"],"issuer":"DigiCert TLS RSA SHA256 2020 CA1","validFrom":1663113600,"validTo":1697414399,"signedCertificateTimestampList":[{"status":"Verified","origin":"Embedded in certificate","logDescription":"Google 'Xenon2023' log","logId":"ADF7BEFA7CFF10C88B9D3D9C1E3E186AB467295DCFB10C24CA858634EBDC828A","timestamp":1663169386417,"hashAlgorithm":"SHA-256","signatureAlgorithm":"ECDSA","signatureData":"3045022100FB08E42417D8338773E25C305223235FD6D30C090D39193141AF7C386CD583DF02202C642BE189F7DE353083B9BCD98F3DF7014EB803DF269BE23351AC18F228E803"},{"status":"Verified","origin":"Embedded in certificate","logDescription":"DigiCert Yeti2023 Log","logId":"35CF191BBFB16C57BF0FAD4C6D42CBBBB627202651EA3FE12AEFA803C33BD64C","timestamp":1663169386384,"hashAlgorithm":"SHA-256","signatureAlgorithm":"ECDSA","signatureData":"304502203645CF77700753CFC811C9C02959A866FF3B4F347555E2252F7842267BB6836C022100B619133AFBFB3E950A39322BD3CFECC4E4ABA24B354D1DFE3FBA3F8F2F3723A3"},{"status":"Verified","origin":"Embedded in certificate","logDescription":"DigiCert Nessie2023 Log","logId":"B3737707E18450F86386D605A9DC11094A792DB1670C0B87DCF0030E7936A59A","timestamp":1663169386468,"hashAlgorithm":"SHA-256","signatureAlgorithm":"ECDSA","signatureData":"304402200782624FF146560CCFF5D48530A4B5766945F006222D21E487D962026A3C435602207F1739B4AEF854666E69B294619485DD94CDF012C6253F4F955ECCE3A6AE8669"}],"certificateTransparencyCompliance":"compliant","serverSignatureAlgorithm":2052,"encryptedClientHello":false}},"type":"Image","frameId":"02FC76DD83EC140C804E9EBB0F2F7C62","hasUserGesture":false},"targetType":"page","sessionId":"EBFE6CF6852CFE9E269254DD9B5E0C34"},
{"method":"Network.requestWillBeSent","params":{"requestId":"31581.102","loaderId":"4A72DC93BD5B2F1FC2732BD4C4E1A232","documentURL":"https://www.cnet.com/","request":{"url":"https://pixel.tapad.com/idsync/ex/receive?partner_id=1830&partner_device_id=362f40e3-c382-44f2-879f-5faa847c7d0c&ttd_puid=c0b0432c-64e8-4f10-b286-5ed2d7f9ec9d%2Chttps%253A%252F%252Fids.ad.gt%252Fapi%252Fv1%252Ftapad_match%253Fid%253DAU1D-0100-001684779540-S135AXKT-AZHU%2526tapad_id%253Dc0b0432c-64e8-4f10-b286-5ed2d7f9ec9d%2C","method":"GET","headers":{"Referer":"https://www.cnet.com/","User-Agent":"Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Mobile Safari/537.36"},"mixedContentType":"none","initialPriority":"Low","referrerPolicy":"no-referrer-when-downgrade","isSameSite":false},"timestamp":53867.663725,"wallTime":1684779540.210102,"initiator":{"type":"parser","url":"https://www.cnet.com/","lineNumber":707,"columnNumber":1},"redirectHasExtraInfo":true,"redirectResponse":{"url":"https://match.adsrvr.org/track/cmf/generic?ttd_pid=tapad&ttd_tpi=1&ttd_puid=c0b0432c-64e8-4f10-b286-5ed2d7f9ec9d%252Chttps%25253A%25252F%25252Fids.ad.gt%25252Fapi%25252Fv1%25252Ftapad_match%25253Fid%25253DAU1D-0100-001684779540-S135AXKT-AZHU%252526tapad_id%25253Dc0b0432c-64e8-4f10-b286-5ed2d7f9ec9d%252C&gdpr=0&gdpr_consent=","status":302,"statusText":"","headers":{"pragma":"no-cache","date":"Mon, 22 May 2023 18:19:00 GMT","x-aspnet-version":"4.0.30319","p3p":"CP=\"NOI DSP COR CUR ADMo DEVo PSAo PSDo OUR SAMo BUS UNI NAV\"","location":"https://pixel.tapad.com/idsync/ex/receive?partner_id=1830&partner_device_id=362f40e3-c382-44f2-879f-5faa847c7d0c&ttd_puid=c0b0432c-64e8-4f10-b286-5ed2d7f9ec9d%2Chttps%253A%252F%252Fids.ad.gt%252Fapi%252Fv1%252Ftapad_match%253Fid%253DAU1D-0100-001684779540-S135AXKT-AZHU%2526tapad_id%253Dc0b0432c-64e8-4f10-b286-5ed2d7f9ec9d%2C","content-type":"text/html","cache-control":"private,no-cache, must-revalidate","content-length":"683"},"mimeType":"text/html","connectionReused":true,"connectionId":449,"remoteIPAddress":"[64:ff9b::321:dc96]","remotePort":443,"fromDiskCache":false,"fromServiceWorker":false,"fromPrefetchCache":false,"encodedDataLength":666,"timing":{"requestTime":53867.616118,"proxyStart":-1,"proxyEnd":-1,"dnsStart":-1,"dnsEnd":-1,"connectStart":-1,"connectEnd":-1,"sslStart":-1,"sslEnd":-1,"workerStart":-1,"workerReady":-1,"workerFetchStart":-1,"workerRespondWithSettled":-1,"sendStart":0.066,"sendEnd":0.138,"pushStart":0,"pushEnd":0,"receiveHeadersEnd":16.837},"responseTime":1684779540179.285,"protocol":"h2","alternateProtocolUsage":"unspecifiedReason","securityState":"unknown"},"type":"Image","frameId":"02FC76DD83EC140C804E9EBB0F2F7C62","hasUserGesture":false},"targetType":"page","sessionId":"EBFE6CF6852CFE9E269254DD9B5E0C34"},
{"method":"Network.requestWillBeSent","params":{"requestId":"31617.5","loaderId":"992D8E27784816C26018FA580863BCBB","documentURL":"https://ads.pubmatic.com/AdServer/js/user_sync.html?p=156011&s=165626&predirect=https%3A%2F%2Fs.amazon-adsystem.com%2Fecm3%3Fex%3Dpubmatic.com%26id%3DPM_UID","request":{"url":"https://pixel.tapad.com/idsync/ex/receive?partner_id=3371&partner_device_id=1C562A87-F750-40CF-83DA-DC36B0667471","method":"GET","headers":{"sec-ch-ua":"\"Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"115\", \"Chromium\";v=\"115\"","Referer":"https://ads.pubmatic.com/","sec-ch-ua-mobile":"?0","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36","sec-ch-ua-platform":"\"macOS\""},"mixedContentType":"none","initialPriority":"Low","referrerPolicy":"strict-origin-when-cross-origin","isSameSite":false},"timestamp":53869.543484,"wallTime":1684779542.089862,"initiator":{"type":"parser","url":"https://ads.pubmatic.com/AdServer/js/user_sync.html?p=156011&s=165626&predirect=https%3A%2F%2Fs.amazon-adsystem.com%2Fecm3%3Fex%3Dpubmatic.com%26id%3DPM_UID","lineNumber":0,"columnNumber":15890},"redirectHasExtraInfo":false,"type":"Image","frameId":"7B149C4897D6722DFF7B9E848B694A50","hasUserGesture":false},"targetType":"iframe","sessionId":"3D0895F11BD1663D55A5F3DF5A99C8DD"},
{"method":"Network.requestWillBeSent","params":{"requestId":"31618.5","loaderId":"C5A76D5013D916EF1DE96D1149E74C43","documentURL":"https://sync-amz.ads.yieldmo.com/tamptsync?callback=https%3A%2F%2Fs.amazon-adsystem.com%2Fecm3%3Fex%3Dym.com%26id%3D%24UID","request":{"url":"https://pixel.tapad.com/idsync/ex/receive?partner_id=3107&partner_device_id=gfd4bd30b45943908ca9","method":"GET","headers":{"sec-ch-ua":"\"Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"115\", \"Chromium\";v=\"115\"","Referer":"https://sync-amz.ads.yieldmo.com/","sec-ch-ua-mobile":"?0","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36","sec-ch-ua-platform":"\"macOS\""},"mixedContentType":"none","initialPriority":"Low","referrerPolicy":"strict-origin-when-cross-origin","isSameSite":false},"timestamp":53869.556407,"wallTime":1684779542.102779,"initiator":{"type":"parser","url":"https://sync-amz.ads.yieldmo.com/tamptsync?callback=https%3A%2F%2Fs.amazon-adsystem.com%2Fecm3%3Fex%3Dym.com%26id%3D%24UID","lineNumber":6,"columnNumber":163},"redirectHasExtraInfo":false,"type":"Image","frameId":"3F5A1E0C720654664FC8DE7039EF2F25","hasUserGesture":false},"targetType":"iframe","sessionId":"76679A420B360B40D49E18C01CCDC240"},
{"method":"Network.requestWillBeSent","params":{"requestId":"31617.5","loaderId":"992D8E27784816C26018FA580863BCBB","documentURL":"https://ads.pubmatic.com/AdServer/js/user_sync.html?p=156011&s=165626&predirect=https%3A%2F%2Fs.amazon-adsystem.com%2Fecm3%3Fex%3Dpubmatic.com%26id%3DPM_UID","request":{"url":"https://pixel.tapad.com/idsync/ex/receive?partner_id=APPNEXUS&partner_device_id=1400146762626694345&pt=c0b0432c-64e8-4f10-b286-5ed2d7f9ec9d%2C%2C","method":"GET","headers":{"Referer":"https://ads.pubmatic.com/","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"},"mixedContentType":"none","initialPriority":"Low","referrerPolicy":"strict-origin-when-cross-origin","isSameSite":false},"timestamp":53869.767585,"wallTime":1684779542.313966,"initiator":{"type":"parser","url":"https://ads.pubmatic.com/AdServer/js/user_sync.html?p=156011&s=165626&predirect=https%3A%2F%2Fs.amazon-adsystem.com%2Fecm3%3Fex%3Dpubmatic.com%26id%3DPM_UID","lineNumber":0,"columnNumber":15890},"redirectHasExtraInfo":true,"redirectResponse":{"url":"https://secure.adnxs.com/getuid?https%3A%2F%2Fpixel.tapad.com%2Fidsync%2Fex%2Freceive%3Fpartner_id%3DAPPNEXUS%26partner_device_id%3D%24UID%26pt%3Dc0b0432c-64e8-4f10-b286-5ed2d7f9ec9d%252C%252C","status":302,"statusText":"Found","headers":{"Date":"Mon, 22 May 2023 18:19:02 GMT","P3P":"policyref=\"http://cdn.adnxs-simple.com/w3c/policy/p3p.xml\", CP=\"NOI DSP COR ADM PSAo PSDo OURo SAMo UNRo OTRo BUS COM NAV DEM STA PRE\"","Connection":"keep-alive","X-Proxy-Origin":"104.132.154.88; 104.132.154.88; 585.bm-nginx-loadbalancer.mgmt.nym2.adnexus.net; adnxs.com","Content-Length":"0","X-XSS-Protection":"0","Pragma":"no-cache","AN-X-Request-Uuid":"1e9a9a5e-112b-47c0-b0ea-2a65002bcff3","Server":"nginx/1.21.3","Accept-CH":"Sec-CH-UA-Full-Version-List,Sec-CH-UA-Arch,Sec-CH-UA-Model,Sec-CH-UA-Platform-Version,Sec-CH-UA-Bitness","Content-Type":"text/html; charset=utf-8","Access-Control-Allow-Origin":"*","Location":"https://pixel.tapad.com/idsync/ex/receive?partner_id=APPNEXUS&partner_device_id=1400146762626694345&pt=c0b0432c-64e8-4f10-b286-5ed2d7f9ec9d%2C%2C","Cache-Control":"no-store, no-cache, private","Access-Control-Allow-Credentials":"true","Expires":"Sat, 15 Nov 2008 16:00:00 GMT"},"mimeType":"text/html","connectionReused":true,"connectionId":1963,"remoteIPAddress":"[64:ff9b::4443:b357]","remotePort":443,"fromDiskCache":false,"fromServiceWorker":false,"fromPrefetchCache":false,"encodedDataLength":1093,"timing":{"requestTime":53869.692933,"proxyStart":-1,"proxyEnd":-1,"dnsStart":-1,"dnsEnd":-1,"connectStart":-1,"connectEnd":-1,"sslStart":-1,"sslEnd":-1,"workerStart":-1,"workerReady":-1,"workerFetchStart":-1,"workerRespondWithSettled":-1,"sendStart":6.727,"sendEnd":6.75,"pushStart":0,"pushEnd":0,"receiveHeadersEnd":74.413},"responseTime":1684779542313.684,"protocol":"http/1.1","alternateProtocolUsage":"unspecifiedReason","securityState":"unknown"},"type":"Image","frameId":"7B149C4897D6722DFF7B9E848B694A50","hasUserGesture":false},"targetType":"iframe","sessionId":"3D0895F11BD1663D55A5F3DF5A99C8DD"},
{"method":"Network.requestWillBeSent","params":{"requestId":"31618.5","loaderId":"C5A76D5013D916EF1DE96D1149E74C43","documentURL":"https://sync-amz.ads.yieldmo.com/tamptsync?callback=https%3A%2F%2Fs.amazon-adsystem.com%2Fecm3%3Fex%3Dym.com%26id%3D%24UID","request":{"url":"https://pixel.tapad.com/idsync/ex/receive?partner_id=APPNEXUS&partner_device_id=1400146762626694345&pt=c0b0432c-64e8-4f10-b286-5ed2d7f9ec9d%2C%2C","method":"GET","headers":{"Referer":"https://sync-amz.ads.yieldmo.com/","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"},"mixedContentType":"none","initialPriority":"Low","referrerPolicy":"strict-origin-when-cross-origin","isSameSite":false},"timestamp":53869.799662,"wallTime":1684779542.346048,"initiator":{"type":"parser","url":"https://sync-amz.ads.yieldmo.com/tamptsync?callback=https%3A%2F%2Fs.amazon-adsystem.com%2Fecm3%3Fex%3Dym.com%26id%3D%24UID","lineNumber":6,"columnNumber":163},"redirectHasExtraInfo":true,"redirectResponse":{"url":"https://secure.adnxs.com/getuid?https%3A%2F%2Fpixel.tapad.com%2Fidsync%2Fex%2Freceive%3Fpartner_id%3DAPPNEXUS%26partner_device_id%3D%24UID%26pt%3Dc0b0432c-64e8-4f10-b286-5ed2d7f9ec9d%252C%252C","status":302,"statusText":"Found","headers":{"Date":"Mon, 22 May 2023 18:19:02 GMT","P3P":"policyref=\"http://cdn.adnxs-simple.com/w3c/policy/p3p.xml\", CP=\"NOI DSP COR ADM PSAo PSDo OURo SAMo UNRo OTRo BUS COM NAV DEM STA PRE\"","Connection":"keep-alive","X-Proxy-Origin":"104.132.154.88; 104.132.154.88; 585.bm-nginx-loadbalancer.mgmt.nym2.adnexus.net; adnxs.com","Content-Length":"0","X-XSS-Protection":"0","Pragma":"no-cache","AN-X-Request-Uuid":"f9f47ea0-8274-4ece-9b18-1174b753a559","Server":"nginx/1.21.3","Accept-CH":"Sec-CH-UA-Full-Version-List,Sec-CH-UA-Arch,Sec-CH-UA-Model,Sec-CH-UA-Platform-Version,Sec-CH-UA-Bitness","Content-Type":"text/html; charset=utf-8","Access-Control-Allow-Origin":"*","Location":"https://pixel.tapad.com/idsync/ex/receive?partner_id=APPNEXUS&partner_device_id=1400146762626694345&pt=c0b0432c-64e8-4f10-b286-5ed2d7f9ec9d%2C%2C","Cache-Control":"no-store, no-cache, private","Access-Control-Allow-Credentials":"true","Expires":"Sat, 15 Nov 2008 16:00:00 GMT"},"mimeType":"text/html","connectionReused":false,"connectionId":2319,"remoteIPAddress":"[64:ff9b::4443:b357]","remotePort":443,"fromDiskCache":false,"fromServiceWorker":false,"fromPrefetchCache":false,"encodedDataLength":1093,"timing":{"requestTime":53869.693054,"proxyStart":-1,"proxyEnd":-1,"dnsStart":0,"dnsEnd":0,"connectStart":0,"connectEnd":18.122,"sslStart":0,"sslEnd":18.119,"workerStart":-1,"workerReady":-1,"workerFetchStart":-1,"workerRespondWithSettled":-1,"sendStart":35.91,"sendEnd":35.987,"pushStart":0,"pushEnd":0,"receiveHeadersEnd":106.337},"responseTime":1684779542345.724,"protocol":"http/1.1","alternateProtocolUsage":"unspecifiedReason","securityState":"unknown"},"type":"Image","frameId":"3F5A1E0C720654664FC8DE7039EF2F25","hasUserGesture":false},"targetType":"iframe","sessionId":"76679A420B360B40D49E18C01CCDC240"},

@connorjclark
Copy link
Collaborator Author

I thought it could be related to subframes opening a connection before the top frame makes its first request to the same origin. And it could play a part. But I can't get a consistent connect start of 0 (just very close). There must be too much out of our control, this can just happen rarely.

My test fixture:

<!DOCTYPE html>
<html>
<head>
  <link rel='dns-prefetch' href='https://fonts.gstatic.com' crossorigin />
  <link rel='preconnect' href='https://fonts.gstatic.com' crossorigin />
  <style>
    div {
      font-family: 'Droid Sans';
    }
  </style>
</head>
<body>

<div>preconnect</div>
<script>
  let timeout = 0;
  if (document.location.search !== '?noframe') {
    const el = document.createElement('iframe');
    el.src = '?noframe';
    document.body.append(el);
    timeout = 10 * 1000;
  }

  setTimeout(() => {
    const el = document.createElement('link');
    el.href = 'https://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold|PT+Sans:regular,italic,bold|Droid+Sans:400,700|Lato:700,900';
    el.rel = 'stylesheet';
    document.head.append(el);

    const el2 = document.createElement('script');
    el2.src = './hello.js?redirect=./hello.js';
    document.head.append(el2);
  }, timeout);
</script>

</body>
</html>

@connorjclark connorjclark changed the title core(network-analyzer): include zero start times in rtt estimate core(network-analyzer): include 0 start times in rtt estimate Jun 12, 2023
@connorjclark connorjclark merged commit 18a8c28 into main Jun 12, 2023
33 checks passed
@connorjclark connorjclark deleted the net-an-zeros branch June 12, 2023 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants