]> Cypherpunks repositories - gostls13.git/commit
runtime/pprof: retry failed tests with longer duration
authorAustin Clements <austin@google.com>
Fri, 15 Jan 2016 19:23:43 +0000 (14:23 -0500)
committerAustin Clements <austin@google.com>
Tue, 26 Jan 2016 22:09:40 +0000 (22:09 +0000)
commit7037c15e19582cb192cb1edfa7e2c1bf46746ee5
treef02f2c1a450fead57e39e5c029eefbfc23695007
parentaff6aa0a21baa332bb94c34795520008c8db9198
runtime/pprof: retry failed tests with longer duration

Currently we run profiling tests for around 200ms in short mode.
However, even on platforms with good profiling, these tests are
inherently flaky, especially on loaded systems like the builders.

To mitigate this, modify the profiling test harness so that if a test
fails in a way that could indicate there just weren't enough samples,
it retries with a longer duration.

This requires some adjustment to the profile checker to distinguish
"fatal" and "retryable" errors. In particular, we no longer consider
it a fatal error to get a profile with zero samples (which we
previously treated as a parse error). We replace this with a retryable
check that the total number of samples is reasonable.

Fixes #13943. Fixes #13871. Fixes #13223.

Change-Id: I9a08664a7e1734c5334b1f3792a56184fe314c4d
Reviewed-on: https://go-review.googlesource.com/18683
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/runtime/pprof/pprof_test.go