<div dir="ltr">Where: <a href="https://github.com/darach/hdr_histogram_erl">https://github.com/darach/hdr_histogram_erl</a><br><br>What:<br><br>The HDR histogram library is an Erlang native interface function wrapper of Mike Barker's C port of Gil Tene's HDR Histogram java utility. <div><br></div><div>Details here: <a href="http://hdrhistogram.org/">http://hdrhistogram.org/</a><br><br>A high dynamic range histogram is one that supports recording and analyzing sampled data points across a configurable range with configurable precision within that range. The precision is expressed as a number of significant figures in the recording.<br><br>This HDR histogram implementation is designed for recording histograms of value measurements in latency sensitive environments. Although the native recording times can be as low as single digit nanoseconds there is added overhead in this wrapper/binding due to both the frontend overhead of converting from native C to the NIF interface, and the erlang overhead incurred calling into the NIFs. C'est la vie, I suppose.<br><br>A distinct advantage of this histogram implementation is constant space and recording (time) overhead with an ability to recycle and reset instances whilst reclaiming already allocated space for reuse thereby reducing allocation cost and garbage collection overhead in the BEAM where repeated or continuous usage is likely. For example, a gen_server recording metrics continuously and resetting and logging histogram dumps on a periodic or other windowed basis.<div><br></div><div>API docs here - <a href="https://github.com/darach/hdr_histogram_erl/blob/master/doc/hdr_histogram.md">https://github.com/darach/hdr_histogram_erl/blob/master/doc/hdr_histogram.md</a></div><div><br></div><div>There are simple Erlang and Elixir examples in the repository.</div><div><br></div><div>Enjoy!</div><div><br></div><div><br></div></div></div>