From ddb11e7b5ba1070e11118b03c0a3ea14f0861c36 Mon Sep 17 00:00:00 2001 From: nisbet-hubbard <87453615+nisbet-hubbard@users.noreply.github.com> Date: Sun, 16 Jun 2024 07:18:05 +0800 Subject: [PATCH] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 9ed9d684..101e103f 100644 --- a/README.md +++ b/README.md @@ -203,6 +203,12 @@ wget -O 'profile.pprof' 'http://localhost:6060/debug/pprof/profile?seconds=10' ``` Then send `profile.pprof` to someone who will then run `go tool pprof -http :5656 profile.pprof` and typically view the flame graph: View -> Flame Graph. +To build **with PGO**, run: +``` +$ wget -O 'default.pgo' 'http://localhost:6060/debug/pprof/profile?seconds=30' +$ CGO_ENABLED=0 go build -o after_pgo ./cmd/syncv3 +``` + ### Developers' cheat sheet