Created
April 29, 2022 02:55
-
-
Save mrkagelui/c8734fe8e666d7b8fd8a45cb947e810a 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