[SERVER-7365] Allow flushing of CPU profiler stats during long-running operation Created: 16/Oct/12 Updated: 28/Jan/20 Resolved: 28/Jan/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Performance |
| Affects Version/s: | 2.2.0 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | John Hinsdale | Assignee: | DO NOT USE - Backlog - Platform Team |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Linux / Debian / x86_64 |
||
| Issue Links: |
|
||||||||||||
| Participants: | |||||||||||||
| Description |
|
When gperftools CPU profiling is enabled for a specifically bracketed operation, using ProfilerStart() and ProfilerStop(), and the operation is a very long-running one, it can be useful for the client to flush the statistics during the operation: output can be examined while the operation is running to see what is going on, some stats are available in the event of an abort, etc. It's precisely the long-running operations that benefit most from not losing the stats at the end if something goes wrong. The attached patch allows calling ProfileFlush in a way similar to start/stop. |
| Comments |
| Comment by Andrew Morrow (Inactive) [ 28/Jan/20 ] |
|
Closing, since |
| Comment by John Hinsdale [ 17/Oct/12 ] |
|
Ian: Nuked the attachment so there is no confusion. I'll Email you. Cheers --JH |
| Comment by Ian Whalen (Inactive) [ 17/Oct/12 ] |
|
hin you can leave or delete the patch as you wish. I'd also appreciate it if you could email me at ian@10gen.com with your concern about the contributor agreement - I can pass it along to our legal team so we can keep that in mind going forward. |
| Comment by John Hinsdale [ 17/Oct/12 ] |
|
Hi Ben, Ian, looked it over, and for reasons I can't go into here, I can't sign the contributor agreement. If you want, I'll remove the (fairly trivial) attachmed patch, as I highly doubt anyone would need it at all to implement the plumb-through to ProfileFlush(); it was the result of literally about 5 minutes' work, mostly C&P. Thanks --JH |
| Comment by John Hinsdale [ 17/Oct/12 ] |
|
OK, looking... |
| Comment by Ben Becker [ 17/Oct/12 ] |
|
Hi John, Thanks for submitting this. Integration of ProfileFlush() makes sense, and a cursory review of this patch looks good. We may add a few additional helpers too. Could you let me know once you've signed the contributor agreement? Thanks for taking the time to add this binding. Best, |
| Comment by Ian Whalen (Inactive) [ 16/Oct/12 ] |
|
Hi John, thanks a lot for the patch submission. Before we can work with it, we'll need you to fill out the contributor agreement at http://www.10gen.com/contributor. |