I've got a multi-threaded Python application, and I'm currently troubleshooting very high (90% or more) CPU usage.
I'm going to be trying out the profiler, but I wanted to see if there is a way I can get CPU usage per thread from within the application. I understand that os.times() will get CPU usage overall - is there something I can run from within each thread to get each thread's usage? It would be very helpful to determine which thread is eating CPU.