Welcome Guest.   Make a donation to an author on the site October 31, 2014, 10:50:33 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Learn about the DonationCoder.com microdonation system (DonationCredits).
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Need prgm to measure the real runtime usage of a program  (Read 6645 times)
pstein
Participant
*
Posts: 22

View Profile Give some DonationCredits to this forum member
« on: December 02, 2007, 06:12:31 AM »

I want to measure sometimes the real runtime of a program for a certain task (which can be hours).
Think of an video encoding program or a huge source compilation or a defragmentation
of a whole partition or a duplicate search through all partitons of x GB.

All these programs run for hours. What I want to do now is to start the program in the evening
and let it run during the night.
When the actual work ends the total time which was necessary for this
task should be logged.
In order to compare different settings  or multiple programs I would like to know the time
which was needed by the prorgam.
Keep in mind that the progam is still running but with a CPU usage
of 0 or close to 0.

I would appreciate a utility function which monitor the CPU usage and the hard disc accesses.
When I ends for lets say more than 1 minutes it should be assumed that the program had finished its work.

Is it possible to include such a function in ProcessTamer?

Or does someone know a program which offers such a feature ?

Thank you
Peter

Logged
EĆ³in
Charter Member
***
Posts: 1,400


O'Callaghan

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #1 on: December 02, 2007, 06:59:51 AM »

Perhaps Process Explorer would be useful to you, the CPU time figure could be an accurate measure of how much 'work' an application did.

Logged

Interviewer: Is there anything you don't like?
Bjarne Stroustrup: Marketing hype as a substitute for technical argument. Thoughtless adherence to dogma. Pride in ignorance.
pstein
Participant
*
Posts: 22

View Profile Give some DonationCredits to this forum member
« Reply #2 on: December 02, 2007, 07:36:20 AM »

No. It does NOT report how long (read: how many minutes) the program run until it fell asleep
Logged
Hooyoo
Participant
*
Posts: 1


View Profile Give some DonationCredits to this forum member
« Reply #3 on: December 02, 2007, 09:04:11 AM »

You can use performance monitor to track your program, either running time or CPU usage, memory usage etc.
How to start performance monitor: %SystemRoot%\system32\perfmon.msc
MS windows only smiley
Logged
EĆ³in
Charter Member
***
Posts: 1,400


O'Callaghan

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #4 on: December 02, 2007, 09:34:30 AM »

When a process is idleing it uses pretty much no CPU time, so if an encoder runs full speed for 4 hours then sleeps for the rest of the night then CPU time reported the next morning should be about those four hours.

So unless the program does alot of unrelated stuff in the background which you don't want to measure then CPU time is the way to go.
Logged

Interviewer: Is there anything you don't like?
Bjarne Stroustrup: Marketing hype as a substitute for technical argument. Thoughtless adherence to dogma. Pride in ignorance.
f0dder
Charter Honorary Member
***
Posts: 8,774



[Well, THAT escalated quickly!]

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #5 on: December 03, 2007, 08:48:33 AM »

Microsoft has a tool called "time" or "timeit" iirc. in the Windows Resource Kit, which will do exactly what you want - it reports the "wall time" (ie, running time), as well as CPU time used, both user & kernel mode, and some I/O statistics as well. Great stuff!
Logged

- carpe noctem
pstein
Participant
*
Posts: 22

View Profile Give some DonationCredits to this forum member
« Reply #6 on: December 03, 2007, 09:31:06 AM »

This is very interesting. I just tried it out a couple of times.

But it always ends with a message like

timeit.exe -a -i -d "D:\test\sophos antirootkit\sarcli.exe"
CreateProcess( ' D:\test\sophos antirootkit\sarcli.exe"') failed (2)

When I omit some flags the error remains.
Only if I run the command alone then it works

So could you give me some more information.
I did not found any further samples and tutorials in Google on how to use timeit.exe

Thank you
Peter
Logged
f0dder
Charter Honorary Member
***
Posts: 8,774



[Well, THAT escalated quickly!]

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #7 on: December 03, 2007, 09:36:43 AM »

hmmm, that sounds weird - perhaps it doesn't like spaces in filename? Try chdir'ing to the sophos folder and run timeit with a relative path.

Never had problems with timeit myself.. also, if it still fails for sophos, try it on something else and see if that works.

hth.
Logged

- carpe noctem
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.026s | Server load: 0.01 ]