measure elapsed time, amount of memory and cpu used by the extern program
I'm executing an external program through Python. I want to know what is the best choice for calling the outside program, with subprocess.Popen() or with subprocess.call() . Also, I need to measure elapsed time, the amount of memory and CPU used by the external program. I've heard of psutil , but I don't really know which to choose. also I need to measure elapsed time, amount of memory and cpu used by the extern program (I'm going to assume you only need the information available in your platform's rusage . And, since Windows has no such thing at all, I'm also going to assume you don't care