Added a tip for writing tests and benchmarks for hot paths

This commit is contained in:
Aliaksandr Valialkin
2015-11-23 17:02:52 +02:00
parent 5e36ee0947
commit 6773e97ef4
+1
View File
@@ -91,3 +91,4 @@ BenchmarkServerGet10KReqPerConn1KClients-4 5000000 359 ns/op
in production.
`go tool pprof --alloc_objects your-program mem.pprof` usually gives better
insights for optimization than `go tool pprof your-program cpu.pprof`.
* Write [tests and benchmarks](https://golang.org/pkg/testing/) for hot paths.