]> Cypherpunks repositories - gostls13.git/commit
runtime: more reliable mapdelete benchmark
authorHugues Bruant <hugues.bruant@gmail.com>
Mon, 21 Aug 2017 18:16:08 +0000 (11:16 -0700)
committerDaniel Martí <mvdan@mvdan.cc>
Sat, 21 Oct 2017 22:48:07 +0000 (22:48 +0000)
commite769c9d6cfdc0e247f2498b10a6eb69054193e98
treeb78aebfe97150907a3b27eedd0149a5e677575aa
parent1de2267bf1e7b867acf2137f15e61ba2b75d7d42
runtime: more reliable mapdelete benchmark

Increasing the map size with the benchmark iteration count
introduced non-linearities and made benchmark runs slow when
increasing benchtime.

Rework the benchmark to use a map size independent of the
iteration count and instead re-fill it when it becomes empty.

Fixes #21546

Change-Id: Iafb6eb225e81830263f30b3aba0d449c361aec32
Reviewed-on: https://go-review.googlesource.com/57650
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/runtime/map_test.go