From 6beea1d4127d2d51bfdc75162423407c198d19da Mon Sep 17 00:00:00 2001 From: a73x Date: Sat, 21 Dec 2024 11:53:54 +0000 Subject: add date to posts --- public/posts/2024-08-25-01 | 128 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 public/posts/2024-08-25-01 (limited to 'public/posts/2024-08-25-01') diff --git a/public/posts/2024-08-25-01 b/public/posts/2024-08-25-01 new file mode 100644 index 0000000..4d55123 --- /dev/null +++ b/public/posts/2024-08-25-01 @@ -0,0 +1,128 @@ + + + + + + + + + + a73x + + + + + + +
+
+
+

a73x

+ high effort, low reward +
+

[{home /} {posts /posts} {ethos /ethos}]

+

posts/2024-08-25-01.html

+ +
+ +← Posts +

Go Benchmarking

+ +

The benchmark cycle:

+ +
    +
  1. write a benchmark
  2. +
  3. run a benchmark
  4. +
  5. get a profile
  6. +
  7. optimise
  8. +
  9. run your tests
  10. +
  11. goto 2.
  12. +
+ +

cpuprofile

+
go test -test=XXX -bench <regex> -cpuprofile <file>
+
+

memprofile

+
go test -test=XXX -bench <regex> -memprofile <file> -benchmem
+
+

pprof

+ +

pprof usage

+
go pprof -http=:8080 profile.pb.gz
+
+

will show a web UI for analysing the profile.

+ +

views

+ + + + + +
+ + + + -- cgit v1.2.3