Make the histogram output configurable
Author: akopytovCreated Sep 2, 2017Updated Jun 9, 2025
Labelsenhancement
This is a request to make the histogram output configurable. Currently, --histogram just dumps the internal array used to calculate percentile values.
However, for analysis by humans it would be great to have:
configurable number of buckets to print. I.e. re-sample the internal 1024-buckets array to 50 or 100 buckets, so the result is more readable
have a more "intuitive" bucket meaning. Currently, the bucket index is calculated as
floor((log(latency) - h->range_deduct) * h->range_mult + 0.5);. So it is hard to explain the value range contained in each specific bucket. It should have the "all latencies smaller than X" semantic.
Source: akopytov/sysbench