Finding out how long a program takes to execute
Is there any command in Linux that I can use to measure the execution time (in milli or micro seconds) of a program?
|
time? :)
|
You want time outside or inside the program?
If inside, read the docs for whatever programming language you're using. I know there are docs for g77, gcc, and g++. I don't know what programming languge you are using. For example, in fortran, you define an array, say INTEGER tick(2), then use etime, dtime, or wahtever to find the time of a particular program section. I'm sure there are similiar stuffs for other languages. If outside, use a script w/ time before and after the program, i.e., #/bin/sh time <your program> time Sheng-Chieh |
All times are GMT -5. The time now is 11:07 AM. |