Get external page TTFP, full load time and so on

Hey guys,

I have been searching Google for a couple of days now without any progress. Hopefully anyone can tell me how I can solve this problem that I have.

I would like to get some metric information about external pages i.e. when I connect to google.com I would like to get:

  1. TTFB time
  2. Full page load time

Is there any way to get these kind of information in Golang? I am currently using http.Client and I can measure the response time which is working fine, but what I rather have is the TTFB and full page loading time.

Hope someone can help me out.

I just started programming go, but I cam across this module: httptrace package - net/http/httptrace - Go Packages

Seems to be able to track how long each of the connection steps take. But ofc no “Full Page loaded” event, as a crawler can not do this on it’s own, you would really need a browser (headless) to do so professionally.

Golang with http.Client, is as far as I know just calling this one ressource, not all it’s subressources and also not rendering anything or running JS.

Maybe: GitHub - go-rod/rod: A Devtools driver for web automation and scraping

1 Like

Thanks so much for your reply, I will check out that package otherwise I’ll try and use a headless browser.