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

Ability to Merge Results #271

Closed
cfis opened this issue May 13, 2020 · 8 comments
Closed

Ability to Merge Results #271

cfis opened this issue May 13, 2020 · 8 comments

Comments

@cfis
Copy link
Member

cfis commented May 13, 2020

It is useful to be able to merge results together, especially when fibers or threads as workers. Currently ruby-prof will show separate results for each fiber (or thread). Combining these calls stacks would make interpretation of results much easier.

See #261, #266

@ioquatix
Copy link

Can you not just combine the results based on symbolic name, e.g. method name?

@cfis
Copy link
Member Author

cfis commented May 13, 2020

Yes, that is what I was thinking, as long as the root methods have the same name. It would be nice to do in Ruby, but then the c-api needs to be expanded a fair bit. So maybe I'll just do it C.

@rmosolgo
Copy link

rmosolgo commented Jan 5, 2021

👋 Long-time listener, first time caller here! Thanks for your work on ruby-prof, it's one of my favorite tools. I'm considering adding Fiber-based concurrency to GraphQL-Ruby (rmosolgo/graphql-ruby#3264) but ran into the issue of results split by fiber. It makes it much harder to interpret the results, since a single GraphQL query is split across several reports. I read that merge_fibers: was previously supported, but was removed because of bugs.

I just thought I'd mention, I'd love to see this if you find time to take a look at it! I'll keep an ear out in the meantime. Thanks again 🍻

@ioquatix
Copy link

ioquatix commented Jan 5, 2021

As an alternative, how does stack prof behave?

@cfis
Copy link
Member Author

cfis commented Jan 6, 2021

Yes, merge fibers didn't work. Its not actually all the easy to accomplish this which is why it isn't done...But I'll see if I can take another look.

cfis added a commit that referenced this issue Jan 24, 2023
@cfis
Copy link
Member Author

cfis commented Feb 7, 2023

@ioquatix this functionality is now available in ruby-prof 1.5.0. Sorry for the long delay.

@cfis cfis closed this as completed Feb 7, 2023
@ioquatix
Copy link

ioquatix commented Feb 7, 2023

Wow that's awesome!!

@cfis
Copy link
Member Author

cfis commented Feb 7, 2023

Documented here - https://ruby-prof.github.io/#merge-threads.

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

No branches or pull requests

3 participants