less than a minute
Enable fgtrace
Forward the new fgtrace port
Visit the /debug/fgtrace
trace path using Insomnia or similar. (It will take about half minute for a trace to complete
Export the returned JSON
Open the Perfetto UI
Click on “Open trace file” and select the exported JSON
Wait for it to load
You are now seeing a chrome like waterfall graph, showing the wallclock time used by each goroutine
If you expand a goroutine, you can view what function calls it made
Due to our sampling frequency, function calls under 0.01 seconds will not be captured
Tip:
You can use the query parameters “seconds” and “hz” to control the trace length and frequency