linux - How do I time execution duration of a program or script from the command line? -
i'm learning c , sense how faster of c code python equivalent.
i'm running ubuntu 12.04
from command line can use "time" command. give execution time of program in 3 separate mode (by default) - a. real time; b. user time; c. system time.
a. real time indicates how time took overall; b. user time indicates how time took executing @ userspace c. system time indicates how time took executing @ kernel space.
above way measure time commnad line. can measure program execution time in program - using system call gettimeofday().
Comments
Post a Comment