topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday December 14, 2024, 2:14 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Need prgm to measure the real runtime usage of a program  (Read 12880 times)

pstein

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 32
    • View Profile
    • Donate to Member
Need prgm to measure the real runtime usage of a program
« on: December 02, 2007, 06:12 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


Eóin

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,401
    • View Profile
    • Donate to Member
Re: Need prgm to measure the real runtime usage of a program
« Reply #1 on: December 02, 2007, 06:59 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.

7zPerf.PNG

pstein

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 32
    • View Profile
    • Donate to Member
Re: Need prgm to measure the real runtime usage of a program
« Reply #2 on: December 02, 2007, 07:36 AM »
No. It does NOT report how long (read: how many minutes) the program run until it fell asleep

Hooyoo

  • Participant
  • Joined in 2007
  • *
  • Posts: 1
    • View Profile
    • Donate to Member
Re: Need prgm to measure the real runtime usage of a program
« Reply #3 on: December 02, 2007, 09:04 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 :)

Eóin

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,401
    • View Profile
    • Donate to Member
Re: Need prgm to measure the real runtime usage of a program
« Reply #4 on: December 02, 2007, 09:34 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.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Need prgm to measure the real runtime usage of a program
« Reply #5 on: December 03, 2007, 08:48 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!
- carpe noctem

pstein

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 32
    • View Profile
    • Donate to Member
Re: Need prgm to measure the real runtime usage of a program
« Reply #6 on: December 03, 2007, 09:31 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

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Need prgm to measure the real runtime usage of a program
« Reply #7 on: December 03, 2007, 09:36 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.
- carpe noctem