Created
April 29, 2022 03:00
-
-
Save mrkagelui/ed64487b7628c62a93bf0500a904d1eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
f, err := os.Create("cpu.prof") | |
if err != nil { | |
log.Fatal(err) | |
} | |
pprof.StartCPUProfile(f) | |
defer pprof.StopCPUProfile() | |
// the rest of the logic | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment