fourk/blueflood — pull request #2 by fourk (2014-03-20 20:08:46+00:00)
Title: allow deserialization of preaggregated metrics

This is based off of https://github.com/rackerlabs/blueflood/pull/274

This PR adds functionality to serialize and deserialize PreaggregatedMetric.

their representation looks like:

```repr.json
[{"class":"preaggregated","collectionTime":12345,"tenantId":"gone","metricName":"in","rollupType":"COUNTER","metricValue":{"type":"counter","count":1,"rate":0.06666666666666667,"sampleCount":0},"ttlInSeconds":60},
{"class":"preaggregated","collectionTime":12345,"tenantId":"gone","metricName":"in","rollupType":"GAUGE","metricValue":{"type":"gauge","count":1,"timestamp":1389211230,"latestNumericValue":397,"mean":397,"var":0.0,"min":397,"max":397},"ttlInSeconds":60},
{"class":"preaggregated","collectionTime":12345,"tenantId":"gone","metricName":"in","rollupType":"SET","metricValue":{"type":"set","hashes":[746007989,1875251108,98262,103159993,1727114331,-1034140067,98699,1062516268,99644],"count":9},"ttlInSeconds":60},
{"class":"preaggregated","collectionTime":12345,"tenantId":"gone","metricName":"in","rollupType":"TIMER","metricValue":{"type":"timer","sum":214,"count":1,"rate":0.06666666666666667,"sampleCount":1,"min":214,"max":214,"average":214,"variance":0.0,"percentiles":{"98":214,"99":214,"75":214,"999":214,"50":214}},"ttlInSeconds":60}]
```