Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
benchmarks/gc_latency: add new microbenchmark for tricky mutator late…
…ncy issues When run with -bench, emits latency measurements in benchmark format. Includes -trace option for debugging latency issues. go run . -help Usage of /<yuck>/gc_latency: -fluff insert 'fluff' into allocation runs to break up sweeps -how string how the buffer is allocated = {stack,heap,global} (default "stack") -trace string name of trace file to create -OR- runs as a go benchmark: go test -bench=B -count=2 . goos: darwin goarch: amd64 pkg: golang.org/x/benchmarks/gc_latency cpu: Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz BenchmarkGCLatency/how=stack-fluff=false-8 1 3746777895 ns/op 564.0 avg-ns 409.0 median-ns 1266 p29-ns 21452 p39-ns 40774 p49-ns 122054 p59-ns 4629961 p69-ns 5152588 worst-ns BenchmarkGCLatency/how=stack-fluff=false-8 1 3960773922 ns/op 607.0 avg-ns 410.0 median-ns 1386 p29-ns 30254 p39-ns 48302 p49-ns 117086 p59-ns 6043114 p69-ns 8353592 worst-ns BenchmarkGCLatency/how=heap-fluff=false-8 1 3832759983 ns/op 582.0 avg-ns 411.0 median-ns 1519 p29-ns 26273 p39-ns 47897 p49-ns 114378 p59-ns 216399 p69-ns 484183 worst-ns BenchmarkGCLatency/how=heap-fluff=false-8 1 4079520582 ns/op 618.0 avg-ns 417.0 median-ns 2263 p29-ns 29662 p39-ns 60282 p49-ns 147765 p59-ns 344228 p69-ns 638498 worst-ns BenchmarkGCLatency/how=global-fluff=false-8 1 3688413511 ns/op 562.0 avg-ns 409.0 median-ns 1351 p29-ns 28113 p39-ns 40730 p49-ns 104352 p59-ns 202013 p69-ns 468936 worst-ns BenchmarkGCLatency/how=global-fluff=false-8 1 3590957128 ns/op 544.0 avg-ns 409.0 median-ns 1397 p29-ns 25142 p39-ns 40059 p49-ns 101923 p59-ns 431897 p69-ns 658914 worst-ns BenchmarkGCLatency/how=stack-fluff=true-8 1 3645081827 ns/op 552.0 avg-ns 408.0 median-ns 1387 p29-ns 14013 p39-ns 39086 p49-ns 81027 p59-ns 5174202 p69-ns 5994034 worst-ns BenchmarkGCLatency/how=stack-fluff=true-8 1 3761717212 ns/op 573.0 avg-ns 409.0 median-ns 1648 p29-ns 20665 p39-ns 39151 p49-ns 92594 p59-ns 5747097 p69-ns 6512030 worst-ns BenchmarkGCLatency/how=heap-fluff=true-8 1 3686269094 ns/op 559.0 avg-ns 410.0 median-ns 1441 p29-ns 14351 p39-ns 39182 p49-ns 96212 p59-ns 334248 p69-ns 1308733 worst-ns BenchmarkGCLatency/how=heap-fluff=true-8 1 3642812482 ns/op 549.0 avg-ns 409.0 median-ns 1363 p29-ns 14274 p39-ns 38962 p49-ns 97677 p59-ns 267289 p69-ns 662851 worst-ns BenchmarkGCLatency/how=global-fluff=true-8 1 3618725949 ns/op 549.0 avg-ns 409.0 median-ns 1369 p29-ns 13421 p39-ns 39061 p49-ns 103189 p59-ns 227176 p69-ns 541692 worst-ns BenchmarkGCLatency/how=global-fluff=true-8 1 3634821717 ns/op 550.0 avg-ns 408.0 median-ns 1350 p29-ns 15195 p39-ns 39664 p49-ns 90323 p59-ns 529328 p69-ns 590649 worst-ns PASS ok golang.org/x/benchmarks/gc_latency 55.136s Updates golang/go#27732. Change-Id: I19b9060f24cda1547b8d75f762316dd5271e32c6
- Loading branch information