aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql/sql_test.go
diff options
context:
space:
mode:
authorHana Kim <hakim@google.com>2018-01-23 15:02:45 -0500
committerHyang-Ah Hana Kim <hyangah@gmail.com>2018-01-24 14:06:59 +0000
commite89d08e02180b72b541bcda0def3caf754704e25 (patch)
treedb7948deb8ce08c9efc77e095bf8ed7304916821 /src/database/sql/sql_test.go
parent157d8cfbc13fbc4c849075e905b0001fb248b5e6 (diff)
downloadgo-e89d08e02180b72b541bcda0def3caf754704e25.tar.xz
runtime/pprof: scale mutex profile with sampling rate
pprof expects the samples are scaled and reflects unsampled numbers. The legacy profile parser uses the sampling period in the output and multiplies all values with the period. https://github.com/google/pprof/blob/0138a3cd6dad6f94495ba0b5c3a5c124f04ae011/profile/legacy_profile.go#L815 Apply the same scaling when we output the mutex profile in the pprof proto format. Block profile shares the same code, but how to infer unsampled values is unclear. Legacy profile parser doesn't do anything special so we do nothing for block profile here. Tested by checking the profiles reported with debug=0 (proto format) are similar to the profiles computed from legacy format profile when the profile rate is a non-trivial number (e.g. 2) manually. Change-Id: Iaa33f92051deed67d8be43ddffc7c1016db566ca Reviewed-on: https://go-review.googlesource.com/89295 Reviewed-by: Peter Weinberger <pjw@google.com>
Diffstat (limited to 'src/database/sql/sql_test.go')
0 files changed, 0 insertions, 0 deletions