| 1 | # Changelog |
| 2 | |
| 3 | All notable changes to this project will be documented in this file. |
| 4 | |
| 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), |
| 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 7 | |
| 8 | ## [Unreleased] |
| 9 | |
| 10 | ## [1.5.0] - 2026-07-01 |
| 11 | |
| 12 | ### Added |
| 13 | |
| 14 | - `QuantilesResult::into_entries()` — consumes the result and returns the |
| 15 | quantile-to-bucket `BTreeMap` by value, allowing iterator transformations |
| 16 | without borrowing from the original result. |
| 17 | |
| 18 | ## [1.4.1] - 2026-05-19 |
| 19 | |
| 20 | ### Added |
| 21 | |
| 22 | - Midpoint-based `mean()` on the borrowed `CumulativeROHistogramRef` / |
| 23 | `CumulativeROHistogram32Ref` views. The mean is stored on the view |
| 24 | (computed once at construction, or carried over from the owned |
| 25 | histogram's cached value), so `mean()` is a cheap field access exposed |
| 26 | just like `count()` — no per-call streaming computation — letting a |
| 27 | zero-alloc reducer fold it in directly. Returns `None` for an empty |
| 28 | histogram. |
| 29 | |
| 30 | ### Changed |
| 31 | |
| 32 | - `CumulativeROHistogramRef` / `CumulativeROHistogram32Ref` no longer |
| 33 | implement `Eq` (they now carry an `f64` mean); `PartialEq` is retained. |
| 34 | |
| 35 | ## [1.4.0] - 2026-05-19 |
| 36 | |
| 37 | ### Added |
| 38 | |
| 39 | - Midpoint-based `mean()` on `CumulativeROHistogram` / `CumulativeROHistogram32` |
| 40 | — the mean of all observations, estimated from bucket midpoints, computed |
| 41 | once at construction time across `from_parts`, `From<&Histogram>`, and |
| 42 | `From<&SparseHistogram>`. Returns `None` for an empty histogram. |
| 43 | |
| 44 | ### Changed |
| 45 | |
| 46 | - `CumulativeROHistogram` / `CumulativeROHistogram32` no longer implement `Eq` |
| 47 | (they now store an `f64` mean); `PartialEq` is retained. The borrowed |
| 48 | `*Ref` view types are unaffected. |
| 49 | |
| 50 | ## [1.3.1] - 2026-04-29 |
| 51 | |
| 52 | ### Added |
| 53 | |
| 54 | - `CumulativeROHistogramRef<'a>` / `CumulativeROHistogram32Ref<'a>` and |
| 55 | `SparseHistogramRef<'a>` / `SparseHistogram32Ref<'a>` — borrowed views over |
| 56 | histogram storage that mirror the read-only API surface of the owned types. |
| 57 | Lets columnar consumers compute quantiles directly off `&[u32]` slices |
| 58 | without per-snapshot allocation or revalidation. |
| 59 | - `from_parts_unchecked` constructor on each ref type for hot-path use where |
| 60 | invariants are already known to hold; `from_parts` validates as before. |
| 61 | - `as_ref()` on `CumulativeROHistogram*` and `SparseHistogram*` returning the |
| 62 | matching ref view; `From<&Owned> for OwnedRef<'_>` for trait-based conversion. |
| 63 | - `SampleQuantiles` impl on each ref type. |
| 64 | |
| 65 | ## [1.3.0] - 2026-04-29 |
| 66 | |
| 67 | ### Added |
| 68 | |
| 69 | - `Histogram32`, `AtomicHistogram32`, `SparseHistogram32`, and |
| 70 | `CumulativeROHistogram32` — u32-counter sibling types for all four histogram |
| 71 | variants, generated from shared declarative macros |
| 72 | - Sealed `Count` and `AtomicCount` traits abstracting the bucket counter width |
| 73 | (implemented for `u32`/`u64` and their atomic counterparts) |
| 74 | - Cross-width widening `From` conversions (u32 → u64) for all four histogram |
| 75 | families |
| 76 | - Cross-width narrowing `TryFrom` conversions (u64 → u32) for `Histogram`, |
| 77 | `SparseHistogram`, and `CumulativeROHistogram` |
| 78 | - Cross-variant + narrowing `TryFrom` paths for the snapshot pipeline: |
| 79 | `Histogram` → `CumulativeROHistogram32`, `Histogram` → `SparseHistogram32`, |
| 80 | and `SparseHistogram` → `CumulativeROHistogram32` |
| 81 | - u32 benchmark cases for `Histogram` and `AtomicHistogram` |
| 82 | - `rezolus_memory` example comparing `Histogram`, `SparseHistogram`, and |
| 83 | `CumulativeROHistogram` memory footprints from Rezolus parquet recordings |
| 84 | - README "Counter Width" and "Recommended Pipeline" sections, with matching |
| 85 | rustdoc in `lib.rs` |
| 86 | |
| 87 | ### Changed |
| 88 | |
| 89 | - `CumulativeROHistogram` cache-line threshold for linear-vs-binary search is |
| 90 | now count-type-dependent (`64 / size_of::<C>()`); `total_count` and |
| 91 | `individual_count` continue to return `u64` |
| 92 | |
| 93 | ## [1.2.0] - 2026-04-22 |
| 94 | |
| 95 | ### Added |
| 96 | |
| 97 | - `CumulativeROHistogram`, a read-only histogram variant with cumulative |
| 98 | (prefix-sum) counts that enables O(log n) quantile lookups via binary search |
| 99 | (with a linear-scan fallback for cache-line-sized data) |
| 100 | - `From<&Histogram>` and `From<&SparseHistogram>` conversions for constructing |
| 101 | a `CumulativeROHistogram` |
| 102 | - Quantile range query methods on `CumulativeROHistogram` for analytics use |
| 103 | cases |
| 104 | |
| 105 | ## [1.1.0] - 2026-04-06 |
| 106 | |
| 107 | ### Added |
| 108 | |
| 109 | - `SampleQuantiles` trait with `quantiles()` and `quantile()` methods, implemented |
| 110 | for both `Histogram` and `SparseHistogram` |
| 111 | - `QuantilesResult` struct returning a `BTreeMap<Quantile, Bucket>` with |
| 112 | `total_count`, `min`, and `max` bucket metadata |
| 113 | - `Quantile` newtype wrapping validated `f64` in `0.0..=1.0`, implementing |
| 114 | `Ord`/`Eq` for use as a `BTreeMap` key |
| 115 | - `Error::InvalidQuantile` variant for quantile validation errors |
| 116 | |
| 117 | ### Deprecated |
| 118 | |
| 119 | - `Histogram::percentiles()` and `Histogram::percentile()` — use `SampleQuantiles` |
| 120 | trait methods instead |
| 121 | - `SparseHistogram::percentiles()` and `SparseHistogram::percentile()` — use |
| 122 | `SampleQuantiles` trait methods instead |
| 123 | - `Error::InvalidPercentile` — use `Error::InvalidQuantile` instead |
| 124 | |
| 125 | ## [1.0.0] - 2026-03-20 |
| 126 | |
| 127 | First release with changelog. |