On 23/05/2010, at 5:40 PM, Peter Chubb wrote:

>>>>>> "tenzero" == tenzero  <[email protected]> writes:
> 
> tenzero> Hi everyone, I'm seeking a preferably citeable reference to
> tenzero> the amount of error in the returned result from a Time()
> tenzero> command. I want to be able to quote the level of error in
> tenzero> timing the execution speed of my project.
> 
> 
> 
> Do you mean time(2) ???
Actually I used time(1). This may have been unswise, I'm not certain.

What I am trying to do, is simply determine the execution time of a small app I 
wrote in Java.
Like this:
time (java mcoption 104 .05859375 0.001129155 0.09765625 64 4)

I am simply trying to record for performance testing, how long my java app 
takes to execute the Monte Carlo Simulation. 
I will be using it as a performance baseline to compare against my FPGA 
implementation. 

In terms of error, I am simply trying to find out the measurement error in the 
returned value. eg +- 1 millisecond or whatever.
 
> 
> Short answer:  it depends.
> Long answer: time(2) returns the number of seconds since the epoch.
> It's accurate for timing in the absence of leap-seconds, and jumps
> caused by NTP etc.  But it can go backwards, and forwards by more than
> one step at a time.
> 
> For details, see time(7).
> 
> 
> If you want accurate timings, use one of the POSIX monotonic clocks.
> man 3 clock_gettime and look for CLOCK_MONOTONIC
> 
> Also, you are aware (I assume) that how long something takes depends
> not only on its own processing time, but on how much else is happening
> on the system?
Yes I accept that I cannot fully control what else is happening across the 
entire system.

Cheers.
D.


--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to