Previously, the heatmap stored delta histograms plus a summary histogram. This gave us easy access to calculate percentiles across the configured time span, but required incrementing two histograms for every increment and subtracting histograms when aging out old histograms.
Another approach is to use free-running histograms and perform a subtraction only when percentiles are needed or when iterating through the heatmap. As these access methods are expected to be much less frequent than updates, it seems worthwhile to switch to this encoding to make updates less expensive.
Makes required changes to the histogram crate to support the operations needed within the heatmap.
Previously, the heatmap stored delta histograms plus a summary histogram. This gave us easy access to calculate percentiles across the configured time span, but required incrementing two histograms for every increment and subtracting histograms when aging out old histograms.
Another approach is to use free-running histograms and perform a subtraction only when percentiles are needed or when iterating through the heatmap. As these access methods are expected to be much less frequent than updates, it seems worthwhile to switch to this encoding to make updates less expensive.
Makes required changes to the histogram crate to support the operations needed within the heatmap.