I'm implementing a profiler in an application and I'm a little flummoxed about how to implement Python profiling such that the results can be displayed in my existing tool. The application allows for Python scripting via communication with the python interpreter.
I was wondering if anyone has ideas on how to profile Python functions from C++
Thank you for your suggestions :)
The usual technique for profiling already-existing functions that we use in Lua a lot is to overwrite the function with your own version that will start timing, call the original function, and stop timing, returning the value that the original function returned.
How can I "hook into" Python from C++ when it executes a function? My goal is to profile