graphite-project/carbon — pull request #16 by blackmad (2012-08-08 23:20:41+00:00)
Title: Percentile Aggregation Method

sorry, the last pull request was half-broken.

----

wondering what the graphite team thinks of this.

initially we had an implementation that could un-parse metrics like
box.metric.histogram.10 -- 100
box.metric.histogram.90 -- 12

and understand that it meant that it should insert 100 datapoints of value 10, and 12 datapoints of value 90, but that was so gross, I went back to this and will see if our aggregator can handle the volume of dealing with raw values.

--

the rough test of this:

aggregation-rules.conf
..p10 (60) = p10 <>.histogram.
..p90 (60) = p90 <>.histogram.

[blackmad@wfmu twofishes (autocomplete)]$ telnet localhost 2023
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
local.random.histogram.test 10 1344467883
local.random.histogram.test 10 1344467883
local.random.histogram.test 10 1344467883
local.random.histogram.test 10 1344467883
local.random.histogram.test 10 1344467883
local.random.histogram.test 10 1344467883
local.random.histogram.test 10 1344467883
local.random.histogram.test 10 1344467883
local.random.histogram.test 10 1344467883
local.random.histogram.test 5 1344467883

[blackmad@wfmu storage]$ whisper-dump.py ./whisper/local/random/test/p10.wsp | head -n 30
4: 1344459300, 9.5
5: 0, 0
6: 1344459420, 9.5

[blackmad@wfmu storage]$ whisper-dump.py ./whisper/local/random/test/p90.wsp | head -n 30
4: 1344459300, 10
5: 0, 0
6: 1344459420, 10