Simple Java library for storing statistical observations and calculating statistics such as stddev,

Posted by knorv on Stack Overflow See other posts from Stack Overflow or by knorv
Published on 2010-04-13T20:50:24Z Indexed on 2010/04/13 20:53 UTC
Read the original article Hit count: 101

Filed under:
|

For logging purposes I want to collect the response times of an external system, and periodically fetch various statistics (such as min/max/stddev) of the response times. I'm looking for a pure in-memory solution.

What Java library can help me with this simple task?

I'm looking for an API that would ideally look something along the lines of:

StatisticsCollector s = new StatisticsCollector();
while (...) {
  double responseTime = ...;
  s.addObservation(responseTime);
}
double stddev = s.getStandardDeviation();
double mean = s.getMean();

© Stack Overflow or respective owner

Related posts about java

Related posts about statistics