Stephen Colebourne wrote:
----- Original Message ----- From: "Paul Smith" <[EMAIL PROTECTED]>
We have the need to track things in a data-rate format, like "indexes
operations/second" etc and stats similar to what is reported via the
'uptime' command, with averages over a 1 minute, 5 minute, 15 minutes
etc.
Now I'm sure creating my own little API is not that hard, but it
occured to me that this or something similar has to have been done so
many times that someone has released a utility API to help. There
doesn't appear to be any window-style collections in Jakarta
Collections, and the DescriptiveStats class in Math is very useful,
but there's nothing natively in there to do with time-based windows.
The closest I can come to help you is with Joda-Time
http://joda-time.sourceforge.net. We have an Interval class with a
contains method that would be useful in identifying whether an event
was in a particular interval or not. We don't have any collections
though.
Thanks Stephen, that's useful info, we even use Joda, and I didn't think
to look there (silly me). In the end I'm borrowing from the JFreeChart
TimeSeries model classes to help out, as it has a MovingAverage
mechanism as well which will help me.
cheers,
Paul Smith
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]