mirror of
https://github.com/walles/moar.git
synced 2024-08-16 23:40:35 +03:00
README: Improve profiling section
This commit is contained in:
parent
6a44c61809
commit
62322e6cc0
@ -165,6 +165,13 @@ Run microbenchmarks:
|
||||
go test -benchmem -run='^$' -bench=. . ./...
|
||||
```
|
||||
|
||||
Profiling `BenchmarkPlainTextSearch()`. Try replacing `-alloc_objects` with
|
||||
`-alloc_space` or change the `-focus` function:
|
||||
|
||||
```bash
|
||||
go test -memprofilerate 1 -memprofile memprofile.out -benchmem -run='^$' -bench '^BenchmarkPlainTextSearch$' github.com/walles/moar/m && go tool pprof -alloc_objects -focus findFirstHit -relative_percentages -web memprofile.out
|
||||
```
|
||||
|
||||
Build + run:
|
||||
|
||||
```bash
|
||||
|
Loading…
Reference in New Issue
Block a user