Is there a way to record execution time of a script into Excel or DB?


I am testing a particular business process in my organisation. I will be running this script multiple times. I want to record how to long the script took to run each time and record this in excel or a db? Will this be possible?