[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: measure runtime of a java program using Eclipse

"Tarek Garoui" <tgaroui@xxxxxxxx> wrote in message 
news:56a515540829377763e1858b2c449d98$1@xxxxxxxxxxxxxxxxxx
> Hello,
> in the second alternative, I will have the time difference which includes 
> the runtime of other parallel programs. What I need is the runtime of a 
> single Eclipse process.

"runtime" is not a well-defined term.  If you want people to answer specific 
questions, you need to ask specific questions.  We are not telepathic.

But, cumulative CPU time for a process is also not well defined, 
unfortunately.  That's not really how operating systems work.  For instance, 
if two processes are writing files in the same area, the file subsystem may 
process them together - in that case, how much CPU time was spent on which 
process?  You can measure cumulative *user* time for a single process, that 
is time spent in that process's code, but measuring cumulative system time 
is harder.  And of course if you have more than one CPU, then cumulative 
user CPU time will not be the same as real run time.

That said, perhaps you are running on an operating system that can give you 
the estimated cumulative CPU time for a process upon completion.  In that 
case, and if that is really all the information you need, then all you need 
is to be able to wrap your program with a shell of some sort and capture the 
console output upon completion, no?

Personally I would suggest that if your needs are this detailed, you should 
be using a profiler (YourKit, Eclipse TPTP, JProfiler, ...).