The time command-line utility
The time command line utility can help you measure the performance of a program by showing useful information about its execution. The time command line utility runs the specified command and gives timing statistics after the command finishes.
You can see what the output of the time command looks like in the image on the right.
The timing statistics have three parts: real, user and sys times. Real is the actual time from start to finish. User is the CPU time spent in user-mode code. Sys is the CPU time spent in the kernel. Put simply, Sys is the time your program was waiting for Linux to perform tasks for it, whereas User is the time your program was running on a CPU. Adding User and Sys times will show how much CPU time you used. If your machine has multiple CPUs and your process uses multiple threads, then the previous result might exceed the value of the Real time field.