Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(69)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Issue 6483049: code review 6483049: net/http/pprof: updated documentation (run an http server)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 4 months ago by patrickxb
Modified:
13 years, 4 months ago
Reviewers:
minux1 , adg
CC:
golang-dev, minux1, adg, giacomo.tartari_gmail.com
Visibility:
Public.
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.

Patch Set 1 #

Patch Set 2 : diff -r 2518eee18c4f https://code.google.com/p/go/ #

Patch Set 3 : diff -r 2518eee18c4f https://code.google.com/p/go/ #

Total comments: 1

Patch Set 4 : diff -r 80be10893a8b https://code.google.com/p/go/ #

Total comments: 1

Patch Set 5 : diff -r bb2316abeea5 https://code.google.com/p/go/ #

Created: 13 years, 4 months ago
Download [raw] [tar.bz2]
Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -0 lines) Patch
M src/pkg/net/http/pprof/pprof.go View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
Total messages: 13
|
patrickxb
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
13 years, 4 months ago (2012年08月23日 18:49:00 UTC) #1
Hello golang-dev@googlegroups.com,
I'd like you to review this change to
https://code.google.com/p/go/ 
Sign in to reply to this message.
minux1
this change looks good, have you signed the CLA as described in http://tip.golang.org/doc/contribute.html#copyright
13 years, 4 months ago (2012年08月24日 09:50:01 UTC) #2
this change looks good, have you signed the CLA as
described in http://tip.golang.org/doc/contribute.html#copyright 
Sign in to reply to this message.
patrickxb
Just signed it. Thanks. On Fri, Aug 24, 2012 at 4:50 AM, <minux.ma@gmail.com> wrote: > ...
13 years, 4 months ago (2012年08月24日 13:55:46 UTC) #3
Just signed it. Thanks.
On Fri, Aug 24, 2012 at 4:50 AM, <minux.ma@gmail.com> wrote:
> this change looks good, have you signed the CLA as
> described in http://tip.golang.org/doc/contribute.html#copyright
>
> http://codereview.appspot.com/6483049/
-- 
Founder | www.stathat.com | twitter.com/stat_hat
Sign in to reply to this message.
adg
http://codereview.appspot.com/6483049/diff/2001/src/pkg/net/http/pprof/pprof.go File src/pkg/net/http/pprof/pprof.go (right): http://codereview.appspot.com/6483049/diff/2001/src/pkg/net/http/pprof/pprof.go#newcode18 src/pkg/net/http/pprof/pprof.go:18: // need to start one. Import "net/http" and add ...
13 years, 4 months ago (2012年08月29日 03:24:25 UTC) #4
http://codereview.appspot.com/6483049/diff/2001/src/pkg/net/http/pprof/pprof.go
File src/pkg/net/http/pprof/pprof.go (right):
http://codereview.appspot.com/6483049/diff/2001/src/pkg/net/http/pprof/pprof....
src/pkg/net/http/pprof/pprof.go:18: // need to start one. Import "net/http" and
add the following to
Add "net/http" to your imports and the following code to your main function:
 go http.ListenAndServe("localhost:6060", nil)
(or, probably better)
 go func() {
 log.Println(http.ListenAndServe("localhost:6060", nil))
 }()
Sign in to reply to this message.
patrickxb
Hello golang-dev@googlegroups.com, minux.ma@gmail.com, adg@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 4 months ago (2012年08月29日 14:59:43 UTC) #5
Sign in to reply to this message.
minux1
a suggestion. i think if we mention "net/http", we also need to mention "log". http://codereview.appspot.com/6483049/diff/8001/src/pkg/net/http/pprof/pprof.go ...
13 years, 4 months ago (2012年08月29日 15:07:59 UTC) #6
a suggestion.
i think if we mention "net/http", we also need to mention "log".
http://codereview.appspot.com/6483049/diff/8001/src/pkg/net/http/pprof/pprof.go
File src/pkg/net/http/pprof/pprof.go (right):
http://codereview.appspot.com/6483049/diff/8001/src/pkg/net/http/pprof/pprof....
src/pkg/net/http/pprof/pprof.go:18: // need to start one. Add "net/http" to
your imports and the
and "log" to your imports...
Sign in to reply to this message.
patrickxb
Hello golang-dev@googlegroups.com, minux.ma@gmail.com, adg@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 4 months ago (2012年08月29日 15:48:03 UTC) #7
Sign in to reply to this message.
minux1
LGTM, leave for adg.
13 years, 4 months ago (2012年08月29日 15:57:41 UTC) #8
LGTM, leave for adg.
Sign in to reply to this message.
giacomo.tartari_gmail.com
Sorry for jumping in the middle of the thread but given that you are fixing ...
13 years, 4 months ago (2012年08月29日 19:03:48 UTC) #9
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/ 
>
Sign in to reply to this message.
patrickxb
Importing "net/http/pprof" won't waste any clock cycles. When you make a request (like "/debug/pprof/profile"), it ...
13 years, 4 months ago (2012年08月31日 22:25:31 UTC) #10
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.tartari@gmail.com> 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
Sign in to reply to this message.
giacomo.tartari_gmail.com
Sounds perfect. Thank you and sorry for the intrusion. On Saturday, 1 September 2012 00:25:33 ...
13 years, 4 months ago (2012年09月02日 09:45:58 UTC) #11
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 
>
Sign in to reply to this message.
adg
LGTM Thanks!
13 years, 4 months ago (2012年09月04日 01:27:04 UTC) #12
LGTM
Thanks!
Sign in to reply to this message.
adg
*** Submitted as http://code.google.com/p/go/source/detail?r=4965beed4492 *** net/http/pprof: updated documentation (run an http server) Added instructions for ...
13 years, 4 months ago (2012年09月04日 01:27:31 UTC) #13
*** 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>
Sign in to reply to this message.
|
This is Rietveld f62528b

AltStyle によって変換されたページ (->オリジナル) /