A High Dynamic Range Histogram New Extension for PHP


Benjamin Eberlei, Open-Source Enthusiast and Doctrine Project Lead & Contributor, tweeted his first PHP extension from scratch wrapping the HdrHistogram C API

HdrHistogram is a high dynamic range histogram that supports recording and analyzing sampled data value counts across a configurable integer value range with configurable value precision within the range. Value precision is expressed as the number of significant digits in the value recording, and provides control over value quantization behavior across the value range and the subsequent value resolution at any given level.

HdrHistogram-PHP provides a wrapper for the C API, which usage is very similar to the C API :

The PHP wrapper even if it implement most of the API, it’s still missing iterators (LinearIterator, LogIterator, and RecordedIterator) in addition to Serialization/Unserialization. Released under a New-BSD 2 Clause.

More information and download at : HdrHistogram-PHP, documentation in the HdrHistogram website.