LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-07-2005, 04:09 AM   #1
markhod
Member
 
Registered: Sep 2003
Posts: 103

Rep: Reputation: 15
how can I measure how much real time is used to run an executable?


Hello,

Basically I want to see how long it takes my executable to run with different parameters used in one of the algorithms. Is there a way to e.g. submit it to the background (I can do this) AND set a timer going which will stop when the executable finishes running?

I dont want to sit with a stopwatch watching...

Cheers,

Mark
 
Old 04-07-2005, 04:41 AM   #2
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
you mean like the time command?

$time { slocate glib.h; }
/usr/share/gtk-doc/html/glib/glib.html
/usr/include/mozilla-1.7.5/jpeg/jpeglib.h
/usr/include/dbus-1.0/dbus/dbus-glib.h
/usr/include/glib-1.2/glib.h
/usr/include/glib-2.0/glib.h
/usr/include/jpeglib.h
/usr/include/taglib/taglib.h
/home/moody/apps/linux-2.6.11.6/drivers/isdn/hardware/eicon/debuglib.h
/home/moody/gnome-1.4/include/glib-1.2/glib.h

real 0m1.025s
user 0m0.080s
sys 0m0.010s

**********************************88

note that the semicolon in the above command is not a typo.
you can also chain commands together like:

time { xxx && xxx && xxxx && xxxx; }
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I somehow accurately measure the time a operation takes? Like 'unzip -x foo.zip'? brynjarh Linux - Newbie 9 08-18-2004 09:26 PM
How to measure the time to build a package? mullog Linux From Scratch 10 05-11-2004 11:23 AM
accurately measure time rasselin Programming 1 09-05-2003 05:18 PM
how to accurately measure processing time rasselin Programming 3 09-01-2003 11:45 AM
run real time echox Programming 3 04-03-2003 02:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration