Hello,

I want to create a runtime CPU profile but to restrict the profile to a 
specific part of the program. I currently have a way of taking a CPU 
profile for the entire program so have experience with the runtime/pprof 
package but this is a new requirement for me.

The 'section' to be profiled represents a significant amount of code and 
I'm looking to see if any particular part of that section can be improved. 
The problem I have is that the program outside of that section is 
significantly larger (ie. larger CPU load) and dominates the profile data. 

The section to be profiled is entered and exited 60 times per second (at a 
minimum).

In effect, I want to pause the CPU profile when execution exits the section 
and to resume when the profile enters it again. Stopping and restarting the 
profile is too slow.

But maybe there's a completely different way to do this. Does anyone have 
experience with this type of thing?

Regards
Stephen

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/07d1e86b-be2a-471b-9d34-8bf9f1d2c04bn%40googlegroups.com.

Reply via email to