-
Notifications
You must be signed in to change notification settings - Fork 33
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
How are calls being counted? #23
Comments
It's a number of "events", that loosely correlates to number of method calls. It depends on the exact version of ruby and VM optimizations enabled. |
The same events as in Kernel#set_trace_func? |
Briefly looking at the code it looks like we could increase the counter in Giving it a try. |
Nevermind that idea, it's effectively the same as how it works now. |
I came up with lgierth/rblineprof@6517ddc, it's supposed to skip the frame if its file and line equal the previous frame's file and line. Doesn't work yet, but I'll figure it out - my first C steps! |
I got the following result from 100 iterations of the method and I'm wondering how rblineprof comes up with these counts.
In the first three lines of
self.build
, it seems to count the number of method calls, but from then on I have no idea. Might there be a problem with Fibers? Each of the iterations was running in its own Fiber, with roughly 10 running concurrently - although clearly none should have been interrupted (Promise.new
doesn't yield either).Edit: the actual code is on its way...
The text was updated successfully, but these errors were encountered: