]> Cypherpunks repositories - gostls13.git/commit
runtime: expand acceptable PingPongHog factor from 2 to 5
authorAustin Clements <austin@google.com>
Mon, 5 Jun 2017 14:59:57 +0000 (10:59 -0400)
committerAustin Clements <austin@google.com>
Mon, 5 Jun 2017 15:51:49 +0000 (15:51 +0000)
commitd263e855977d49719ceea4da3b843bab5951dffb
tree550510758aa5f65074c849b53efcdceb6b89ef6b
parentb225051f1dbf2e8b7a8fdcf4d740dc20de84658d
runtime: expand acceptable PingPongHog factor from 2 to 5

Since TestPingPongHog tests the scheduler, it's ultimately
probabilistic. Currently, it requires the result be at most of factor
of 2 off of the ideal. It turns out this isn't quite enough in
practice, with factors on 1000 iterations on linux/amd64 ranging from
0.48 to 2.5. If the test were failing, we would expect a factor closer
to 1000X, so it's pretty safe to expand the accepted factor from 2 to
5.

Fixes #20494.

Change-Id: If8f2e96194fe66f1fb981a965d1167fe74ff38d7
Reviewed-on: https://go-review.googlesource.com/44859
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/runtime/proc_test.go