Feuerlabs/exometer — pull request #92 by uwiger (2014-09-30 20:00:50+00:00)
Title: added bounded highnum retention for histograms

The `exometer_slot_slide` histograms are resource-efficient, but can sometimes be off by quite a lot on the higher percentiles. The `exometer_histogram` module is lossless (and thus accurate) and efficient on update, but can be costly on read if the update frequency has been very high.

The option `{keep_high, N}` (if the callback module is exometer_slot_slide) activates a bounded buffer, using the `exometer_shallowtree` module. The number of values to retain can be set to e.g. 10% of the expected number of values in a full window.

The function `exometer_histogram:test_run(Module, Interval)` can be used to experiment with different settings and compare insert- and update cost as well as percentile accuracy.