You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/03/18 04:06:30 UTC

[GitHub] [pulsar-client-go] wolfstudy opened a new pull request #198: Fix pprof typo

wolfstudy opened a new pull request #198: Fix pprof typo
URL: https://github.com/apache/pulsar-client-go/pull/198
 
 
   Signed-off-by: xiaolong.ran <rx...@apache.org>
   
   ### Modifications
   
   - Fix pprof typo

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar-client-go] wolfstudy commented on issue #198: Fix pprof typo

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on issue #198: Fix pprof typo
URL: https://github.com/apache/pulsar-client-go/pull/198#issuecomment-601502383
 
 
   @cckellogg PTAL again thanks.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar-client-go] wolfstudy commented on a change in pull request #198: Fix pprof typo

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on a change in pull request #198: Fix pprof typo
URL: https://github.com/apache/pulsar-client-go/pull/198#discussion_r394775950
 
 

 ##########
 File path: perf/pulsar-perf-go.go
 ##########
 @@ -69,6 +70,15 @@ func main() {
 		Use: "pulsar-perf-go",
 	}
 
+	go func() {
 
 Review comment:
   This feature is also raised by users using pulse-client-go. I think this feature is reasonable, we should provide this way, what do you think?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar-client-go] cckellogg commented on a change in pull request #198: Fix pprof typo

Posted by GitBox <gi...@apache.org>.
cckellogg commented on a change in pull request #198: Fix pprof typo
URL: https://github.com/apache/pulsar-client-go/pull/198#discussion_r394642942
 
 

 ##########
 File path: perf/pulsar-perf-go.go
 ##########
 @@ -69,6 +70,15 @@ func main() {
 		Use: "pulsar-perf-go",
 	}
 
+	go func() {
 
 Review comment:
   In my opinion this should not be started by default and should be controlled with a cli flag. Also, if you run two process only one server will start. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar-client-go] wolfstudy commented on a change in pull request #198: Fix pprof typo

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on a change in pull request #198: Fix pprof typo
URL: https://github.com/apache/pulsar-client-go/pull/198#discussion_r394773235
 
 

 ##########
 File path: perf/pulsar-perf-go.go
 ##########
 @@ -69,6 +70,15 @@ func main() {
 		Use: "pulsar-perf-go",
 	}
 
+	go func() {
 
 Review comment:
   By default, `pprof` does not collect project metrics. So it will not cause any loss in performance. 
   
   But if we do this, we can provide the user with a `pprof` which is directly accessed by the browser. What's wrong?
   
   In this way, people who use the pulsar-go-client in the production environment can also monitor their running status through the browser at all times, instead of collecting each time through the `go tool pprof`.
   
   > Also, if you run two processes only one server will start. Why is this being added?
   
   Are you sure? When testing in my local environment, we can access it in the browser through `localhost: 8889`, or we can use `go tool pprof -http=:8081 $HOME/pprof/pprof.samples.cpu.004.pb.gz` to access.
   
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar-client-go] wolfstudy commented on issue #198: Fix pprof typo

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on issue #198: Fix pprof typo
URL: https://github.com/apache/pulsar-client-go/pull/198#issuecomment-600998019
 
 
   @cckellogg PTAL thanks.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar-client-go] cckellogg commented on a change in pull request #198: Fix pprof typo

Posted by GitBox <gi...@apache.org>.
cckellogg commented on a change in pull request #198: Fix pprof typo
URL: https://github.com/apache/pulsar-client-go/pull/198#discussion_r395201667
 
 

 ##########
 File path: perf/pulsar-perf-go.go
 ##########
 @@ -98,12 +99,33 @@ func stopCh() <-chan struct{} {
 
 func RunProfiling(stop <-chan struct{}) {
 	go func() {
-		if err := serveProfiling("0.0.0.0:6060", stop); err != nil && err != http.ErrServerClosed {
+		addr := getIntranetIP()
+		if err := serveProfiling(addr, stop); err != nil && err != http.ErrServerClosed {
 			log.WithError(err).Error("Unable to start debug profiling server")
 		}
 	}()
 }
 
+func getIntranetIP() string {
 
 Review comment:
   Why is this needed? We would still run into a port binding issues when running a producer and consumer right?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar-client-go] cckellogg commented on a change in pull request #198: Fix pprof typo

Posted by GitBox <gi...@apache.org>.
cckellogg commented on a change in pull request #198: Fix pprof typo
URL: https://github.com/apache/pulsar-client-go/pull/198#discussion_r394778518
 
 

 ##########
 File path: perf/pulsar-perf-go.go
 ##########
 @@ -69,6 +70,15 @@ func main() {
 		Use: "pulsar-perf-go",
 	}
 
+	go func() {
 
 Review comment:
   I'm not against the feature i just think it should be hidden behind a cli flag and not started by default. There is already a FlagProfile and a profiling server is started when that is enabled. Can this profiling be added to that server? I'm confused on why two servers need to be started.
   
   If you start `pulsar-perf produce` and `pulsar-perf consume` on your laptop won't the server try to bind to same port and one of them not start? 
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar-client-go] cckellogg commented on a change in pull request #198: Fix pprof typo

Posted by GitBox <gi...@apache.org>.
cckellogg commented on a change in pull request #198: Fix pprof typo
URL: https://github.com/apache/pulsar-client-go/pull/198#discussion_r394778518
 
 

 ##########
 File path: perf/pulsar-perf-go.go
 ##########
 @@ -69,6 +70,15 @@ func main() {
 		Use: "pulsar-perf-go",
 	}
 
+	go func() {
 
 Review comment:
   I'm not against the feature i just think it should be hidden behind a cli flag and not started by default. There is already a FlagProfile and a profiling server is started when that is enabled. Can this profiling be added to that server? I'm confused on why two need to be started.
   
   If you start `pulsar-perf produce` and `pulsar-perf consume` on your laptop won't the server try to bind to same port and one of them not start? 
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar-client-go] cckellogg commented on a change in pull request #198: Fix pprof typo

Posted by GitBox <gi...@apache.org>.
cckellogg commented on a change in pull request #198: Fix pprof typo
URL: https://github.com/apache/pulsar-client-go/pull/198#discussion_r394642942
 
 

 ##########
 File path: perf/pulsar-perf-go.go
 ##########
 @@ -69,6 +70,15 @@ func main() {
 		Use: "pulsar-perf-go",
 	}
 
+	go func() {
 
 Review comment:
   In my opinion this should not be started by default and should be controlled with a cli flag. Also, if you run two processes only one server will start. Why is this being added?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar-client-go] wolfstudy merged pull request #198: Fix pprof typo

Posted by GitBox <gi...@apache.org>.
wolfstudy merged pull request #198: Fix pprof typo
URL: https://github.com/apache/pulsar-client-go/pull/198
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar-client-go] wolfstudy commented on a change in pull request #198: Fix pprof typo

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on a change in pull request #198: Fix pprof typo
URL: https://github.com/apache/pulsar-client-go/pull/198#discussion_r394773235
 
 

 ##########
 File path: perf/pulsar-perf-go.go
 ##########
 @@ -69,6 +70,15 @@ func main() {
 		Use: "pulsar-perf-go",
 	}
 
+	go func() {
 
 Review comment:
   By default, `pprof` does not collect project metrics. So it will not cause any loss in performance. 
   
   But if we do this, we can provide the user with a `pprof` which is directly accessed by the browser. What's wrong?
   
   In this way, people who use the `pulsar-perf` in the production environment can also monitor their running status through the browser at all times, instead of collecting each time through the `go tool pprof`.
   
   > Also, if you run two processes only one server will start. Why is this being added?
   
   Are you sure? When testing in my local environment, we can access it in the browser through `localhost: 8889`, or we can use `go tool pprof -http=:8081 $HOME/pprof/pprof.samples.cpu.004.pb.gz` to access.
   
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services