Added a simple unit test for testing process stack trace capture #28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm adding support to proxide proxy for capturing the stack traces of the client process that makes requests through the proxy when the client process and the proxide proxy reside on the same host. I have already implemented a preliminary support here: Rantanen/proxide#36.
However, the current approach is a bit inefficient as it always captures the stack traces of all the threads of the client process even though only the stack trace of the thread associated with the request being proxy-ed is enough. Thus I want to add support for capturing stack traces of individual threads at a time to rstack.
To do this, I wanted to start this by adding support for unit testing as I like to execute code during development time with unit tests. => This merge request.
My current plan for adding the support for capturing individual threads is to create a struct call ProcessAttachment which would have a method for capturing stack traces of individual threads. The ProcessAttachment struct would be created by calling a new method called "attach" which would be added to the TraceOptions struct.
Does this plan/idea sound reasonable to you?