guardian/guardian-management — pull request #24 by bruntonspall (2013-04-29 12:57:02+00:00)
Title: Add percentile metrics

We want 90th, 95th and 99th percentiles in applications.

This code manages to keep an in-memory list of the response times and when the json is requests, calculates the 99th percentile of the requests since the last json request.

This may be mathematically dodgy, but I believe that given a regular polling from ganglia, it should give you a moving percentile.

It is a partially breaking change, any client code that has overridden Metric itself will need to change to use json instead of asJson if it wants to handle the percentiles properly. We'll deprecate asJson once we're happy with this change.