]> Cypherpunks repositories - gostls13.git/commit
runtime/pprof: fix period information
authorAustin Clements <austin@google.com>
Tue, 18 Apr 2017 20:41:19 +0000 (16:41 -0400)
committerAustin Clements <austin@google.com>
Thu, 20 Apr 2017 19:35:08 +0000 (19:35 +0000)
commit0c0c94a9dcf90fbb48343d5a02787758d64e306d
treec4cdaa8365646caa9abe95876dcc07fbb587c784
parentf3f3f0d6d509bfaf30b55c0679cff366b50b7eae
runtime/pprof: fix period information

The period recorded in CPU profiles is in nanoseconds, but was being
computed incorrectly as hz * 1000. As a result, many absolute times
displayed by pprof were incorrect.

Fix this by computing the period correctly.

Change-Id: I6fadd6d8ad3e57f31e8cc7a25a24fcaec510d8d4
Reviewed-on: https://go-review.googlesource.com/40995
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
Reviewed-by: Russ Cox <rsc@golang.org>
src/runtime/pprof/proto.go
src/runtime/pprof/proto_test.go