I am trying to conduct some experiments for determining what the CPU utilization of my process is. I am familiar with the top and ps commands. Which would be a better solution for getting the average CPU utilization of my process throughout the entire time? From this question it seems like ps would be the best way. Would using top periodically to record stats and averaging the results be more precise?
Average CPU utilization of a process
ps;top