• Hugues Bruant's avatar
    runtime: more reliable mapdelete benchmark · e769c9d6
    Hugues Bruant authored
    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: 's avatarKeith Randall <khr@golang.org>
    e769c9d6
map_test.go 15.8 KB