Skip to content

Instantly share code, notes, and snippets.

@mdmarek
Created December 24, 2016 06:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdmarek/abebf8a27901d2487ca9fdd0e5e04714 to your computer and use it in GitHub Desktop.
Save mdmarek/abebf8a27901d2487ca9fdd0e5e04714 to your computer and use it in GitHub Desktop.
Profiling Go Processes in Google Cloud
gcloud compute copy-files --zone <zone> <host>:<path>/<binary> /tmp/<binary>.sym
gcloud compute ssh --zone <zone> <host> --ssh-flag="-L <port>:localhost:<port>" --ssh-flag="-N" --ssh-flag="-n"
go tool pprof -lines /tmp/<binary>.sym http://localhost:<port>/debug/pprof/heap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment