Hi!
Juha Lindfors wrote:
> At 22:14 6.11.2000 +0100, you wrote:
> >Using currentTimeMillis() extensively has its drawbacks. First of all it is
> >not very accurate, and can "skip" milliseconds so that two consecutive calls
> >can give 10 ms differences.
>
> Well, its only inaccurate on NT that can't seem to handle anything reliably
> that takes <10ms to run. It has always worked fine on Linux (can get 1ms
> accuracy).
Good! :-) (Turns out I just got Best Linux resellers as neighbours..
perhaps I should do some Q&A)
> You're right about cTM being expensive, which is why the metrics should be
> configurable from the container factory so it can be skipped when you're
> not analyzing your system. However, the tests I ran with the HelloWorld
> test which I thought measured the time it takes on the "stack" didn't show
> that big of a degrade to make it useless.
Good!
> Of course, this can vary depending on the system being used. Mine is slow.
> And if you have better suggestions on measuring time than cTM, I'm all ears.
Well, I don't :-) One thing might be not to check the time per call, but
the number of calls per second. That require less system resources: set
off a timer, set an increment to zero, tick the counter for each call,
and when the timer hits 1 (or 10, or 60 or something) you check the
counter and divide by number of seconds. That could give interesting
metrics (call/second) but would be less intrusive on performance.
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com