FAQ
Importing "net/http/pprof" won't waste any clock cycles. When you
make a request (like "/debug/pprof/profile"), it starts profiling for
30 seconds, then shuts off.

I can add information about this to the documentation, but the point
of my original documentation addition was just to help people get the
example "go tool pprof..." commands working.

Patrick
On Wed, Aug 29, 2012 at 2:03 PM, wrote:
Sorry for jumping in the middle of the thread but given that you are fixing
the documentation I might as well express my doubts here.
If I import _ "net/http/pprof" in my code and do not run the http server
will the application waste clock cycles?
Can the profiler (http server?) be turned on and off during execution (with
a flag or something) and use no cpu when turned off?
Could you please document all this?

Sorry for the intrusion.

Giacomo
On Wednesday, 29 August 2012 17:57:43 UTC+2, minux wrote:

LGTM, leave for adg.

http://codereview.appspot.com/6483049/


--
Founder | www.stathat.com | twitter.com/stat_hat

Search Discussions

  • Giacomo Tartari at Sep 2, 2012 at 9:46 am
    Sounds perfect.
    Thank you and sorry for the intrusion.
    On Saturday, 1 September 2012 00:25:33 UTC+2, Patrick Crosby wrote:

    Importing "net/http/pprof" won't waste any clock cycles. When you
    make a request (like "/debug/pprof/profile"), it starts profiling for
    30 seconds, then shuts off.

    I can add information about this to the documentation, but the point
    of my original documentation addition was just to help people get the
    example "go tool pprof..." commands working.

    Patrick

    On Wed, Aug 29, 2012 at 2:03 PM, <giacomo...@gmail.com <javascript:>>
    wrote:
    Sorry for jumping in the middle of the thread but given that you are fixing
    the documentation I might as well express my doubts here.
    If I import _ "net/http/pprof" in my code and do not run the http server
    will the application waste clock cycles?
    Can the profiler (http server?) be turned on and off during execution (with
    a flag or something) and use no cpu when turned off?
    Could you please document all this?

    Sorry for the intrusion.

    Giacomo
    On Wednesday, 29 August 2012 17:57:43 UTC+2, minux wrote:

    LGTM, leave for adg.

    http://codereview.appspot.com/6483049/


    --
    Founder | www.stathat.com | twitter.com/stat_hat
  • Adg at Sep 4, 2012 at 1:27 am
  • Adg at Sep 4, 2012 at 1:27 am
    *** Submitted as
    http://code.google.com/p/go/source/detail?r=4965beed4492 ***

    net/http/pprof: updated documentation (run an http server)

    Added instructions for starting an http server
    to the godoc header for this package. With the old
    instructions, the example "go tool pprof..." commands
    wouldn't work unless you happen to be running an http
    server on port 6060 in your application.

    R=golang-dev, minux.ma, adg, giacomo.tartari
    CC=golang-dev
    http://codereview.appspot.com/6483049

    Committer: Andrew Gerrand <adg@golang.org>


    http://codereview.appspot.com/6483049/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedAug 31, '12 at 10:25p
activeSep 4, '12 at 1:27a
posts4
users3
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase