diff options
| author | Josh Bleecher Snyder <josharian@gmail.com> | 2019-12-31 21:24:20 -0800 |
|---|---|---|
| committer | Josh Bleecher Snyder <josharian@gmail.com> | 2020-04-20 15:52:05 +0000 |
| commit | 1f0738c1577a55a6b7229b821ddfe762b84771d0 (patch) | |
| tree | f5d385cd8aa706b20c66c93b7da49fe1b2bc43a2 /src/database/sql/sql_test.go | |
| parent | 12d1c9b863ab5135d498a031616ff8a172e471a4 (diff) | |
| download | go-1f0738c1577a55a6b7229b821ddfe762b84771d0.tar.xz | |
runtime/pprof: speed up CPU profiling shutdown
The core CPU profiling loop contains a 100ms sleep.
This is important to reduce overhead.
However, it means that it takes 200ms to shutting down a program
with CPU profiling enabled. When trying to collect many samples
by running a short-lived program many times, this adds up.
This change cuts the shutdown penalty in half by skipping
the sleep whenever possible.
Change-Id: Ic3177f8e1a2d331fe1a1ecd7c8c06f50beb42535
Reviewed-on: https://go-review.googlesource.com/c/go/+/228886
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Diffstat (limited to 'src/database/sql/sql_test.go')
0 files changed, 0 insertions, 0 deletions
