-
Notifications
You must be signed in to change notification settings - Fork 55
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
Support for profiling imported c modules #5
Comments
This profiler should profile functions inside imported python modules. If you can give me an example where it isn't doing this I'll be happy to investigate. |
Ok, maybe I'm just missing something. Let's look at a simle script test.py:
When I run something like that:
I just get:
Where is the number for math.sqrt? Hot to get it? |
It looks like you're on to something, it looks like my approach is unable to sample stackframes inside native c modules. This module should work ok on pure python, but I need to figure out an approach for native code... |
Take a look at Aaron Solowski's version: https://github.com/asokoloski/python-flamegraph He's added support using signal.setitimer that will profile inside of c modules. The downside is you lose thread information, but depending on your use-case that's probably a good trade-off. |
Any progress? |
No, haven't been working in python recently. Pull requests would be considered. Have you checked out Aaron Solowski's version (linked in Jul 21 comment)? |
Now only the functions in the script that is profiled are added to the log. It would be really great to also know what takes time in functions from other modules imported by the profiled script.
The text was updated successfully, but these errors were encountered: