summaryrefslogtreecommitdiff
path: root/content/posts/001.md
diff options
context:
space:
mode:
Diffstat (limited to 'content/posts/001.md')
-rw-r--r--content/posts/001.md12
1 files changed, 9 insertions, 3 deletions
diff --git a/content/posts/001.md b/content/posts/001.md
index 48ea720..fe1e680 100644
--- a/content/posts/001.md
+++ b/content/posts/001.md
@@ -10,15 +10,21 @@ tags: posts
6. goto 2.
## cpuprofile
-`go test -test=XXX -bench <regex> -cpuprofile <file>`
+```shell
+go test -test=XXX -bench <regex> -cpuprofile <file>
+```
## memprofile
-`go test -test=XXX -bench <regex> -memprofile <file> -benchmem`
+```shell
+go test -test=XXX -bench <regex> -memprofile <file> -benchmem
+```
## pprof
[pprof usage](https://github.com/google/pprof/blob/main/doc/README.md)
-`go pprof -http=:8080 profile.pb.gz`
+```shell
+go pprof -http=:8080 profile.pb.gz
+```
will show a web UI for analysing the profile.
### views: