Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Timing the execution of a program

Status
Not open for further replies.

Ezequiel

Programmer
Apr 4, 2001
30
0
0
CA
I need a simple script to measure the time it took to execute a program.

What can I do?

I thought about a shell script that could log the start (current) time, execute the simulation and log the end (current) time.

I'm new to Linux, so if any of you can help me, THANKS.

Regards.
Eze.
---
Ezequiel Glinsky
eze@bumeran.com
Buenos Aires, Argentina
 
There is a program called time that does this.

ex)

tleblanc@qatest06-67: time ls
a
b
0.000u 0.010s 0:00.00 0.0% 0+0k 0+0io 122pf+0w

This took 0.010seconds

-Tony
 
type the following on the command line:

time programName
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top