You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Paul Smith <ps...@aconex.com> on 2005/03/21 05:12:02 UTC
[Math] [Collections] time-based window statistics
[Cross-posting to Math & Collections because of somewhat related nature]
I'm hoping someone may help me here. I've scanned through the Math and
Collection libraries to see if there is anything that can help but
cannot spot it. Perhaps this is out of the scope for Math or
Collections, but perhaps these 2 communities may know where else I
should look.
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.
Has anyone got any ideas that may help? Links? I'd rather 'stand on the
shoulders of giants' than reinvent the wheel.
cheers,
Paul Smith
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [Math] [Collections] time-based window statistics
Posted by Paul Smith <ps...@aconex.com>.
Stephen Colebourne wrote:
> ----- Original Message ----- From: "Paul Smith" <ps...@aconex.com>
>
>> 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: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [Math] [Collections] time-based window statistics
Posted by Stephen Colebourne <sc...@btopenworld.com>.
----- Original Message -----
From: "Paul Smith" <ps...@aconex.com>
> 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.
Stephen
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org