Timing Program Execution
Understand how to measure a program's execution time using the time command in the command-line. Explore real, user, and system time metrics to analyze performance and efficiency of processes, helping you compare program speed or diagnose resource usage.
We'll cover the following...
We'll cover the following...
Sometimes, it’s helpful to know how long a process takes. Maybe we see how long it takes to build a program from the source, or maybe we’re comparing program execution on different machines. The time command tracks how long a process takes to complete.
Using the time command
To use it, we prefix our command with time. Let’s execute this command to search for all of the files on the hard drive that changed in the last 30 minutes and calculate how long ...