Add isc_histo histograms, and use it for message size statistics
This is an adaptation of my hg64
experiments for use in BIND.
As well as renaming everything according to ISC style, I have written some more extensive tests that ensure the edge cases are correct and the fenceposts are in the right places.
Although an isc_histo_t
is thread-safe, it can suffer
from cache contention under heavy load. To avoid this,
you can use an isc_histomulti_t
, which contains a histogram per thread,
so updates are local and low-contention.
The message size stats are specified by RSSAC002 so it's best not to mess
around with how they appear in the statschannel. But it's worth
changing the implementation to use general-purpose histograms, to
reduce code size and benefit from isc_histomulti_t
sharded counters.
This is a foundation for resolving #3464