Linux Format

The time command-line utility

-

The time command line utility can help you measure the performanc­e of a program by showing useful informatio­n 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.

 ??  ?? This image shows the performanc­e difference­s between the Python 2.7.10 version of os.walk() and the Python 3.5.2 version of os.walk().
This image shows the performanc­e difference­s between the Python 2.7.10 version of os.walk() and the Python 3.5.2 version of os.walk().

Newspapers in English

Newspapers from Australia