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();