I have written a script for processing the syslog and I need to calculate the amount of CPU usage and the memory used by this script for its completion. Is there any packages that can be used to achieve the above task?
I'm not looking for the current CPU usage of the entire system but how much of the CPU and RAM is used by the current running python script.
Somethings like if I run the script, how much time it took for its completion and the amount of RAM and CPU used by it in that time interval.
I'm new to the concepts of python and having a difficult time understanding this. Is there any method to do this?
Thanks in advance :)