My Python code takes a long time to run(around 12 hours), is it possible to measure the cpu time it takes to run from its beginning to the end and also measure some part in the code in both Linux and Windows system?
The cluster I'm using is used by many other users, so I want to measure cpu time to see the time my code takes. Wall clock time is not accurate in my case. so I cannot use time.time().
From my understanding timeit module is not useful, as it works for a small snippet, please correct me if it's wrong. Is there any other module that I can use?
Any answer would be appreciate.