Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert StackProf.run / StackProf.result to Ruby #154

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

tenderlove
Copy link
Collaborator

This commit is kind of a yak shave. I would like to add thread tracking
to stackprof. I want to allow people to optionally dump the thread for
which the stack was collected on by doing StackProf.result(threads: true)
Updating the signature for result was kind of hard, so I am
refactoring it to be in Ruby.

This commit technically breaks the case of someone doing:

StackProf.start(out: "some_file.data")
...
StackProf.result

But I think it's strange to ask the start function to dump the file
rather than asking the result function. The result function actually
writes to the file, so I think it makes more sense to pass the file (or
file name) to the result function.

@tenderlove
Copy link
Collaborator Author

Since this is technically a breaking change, I'm going to bump the major version on master and remove some of the supported Ruby versions.

This commit is kind of a yak shave.  I would like to add thread tracking
to stackprof.  I want to allow people to optionally dump the thread for
which the stack was collected on by doing `StackProf.result(threads: true)`
Updating the signature for `result` was kind of hard, so I am
refactoring it to be in Ruby.

This commit technically breaks the case of someone doing:

```ruby
StackProf.start(out: "some_file.data")
...
StackProf.result
```

But I think it's strange to ask the start function to dump the file
rather than asking the result function.  The result function actually
writes to the file, so I think it makes more sense to pass the file (or
file name) to the result function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants