I have a programm that calls several external scripts by using popen from subprocess. Now I want to profile this programm. While I can easily profile the python code with cProfile I get no information on how long the different external scripts run.
I want to avoid messuring every single popen call with a timer.
Thank you!
As Simeon said, you just need to write the timing code once. A way to do it would be to decorate the popen function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With