From b63a8c5bada8cbdca6195f5cbdcb3a347b73150e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 19:20:34 +0000 Subject: [PATCH 1/4] chore(deps): update criterion requirement from 0.6.0 to 0.7.0 Updates the requirements on [criterion](https://github.com/bheisler/criterion.rs) to permit the latest version. - [Changelog](https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/bheisler/criterion.rs/compare/0.6.0...0.7.0) --- updated-dependencies: - dependency-name: criterion dependency-version: 0.7.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 460536c..6a365e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ thiserror = "2.0.11" debug = true [dev-dependencies] -criterion = "0.6.0" +criterion = "0.7.0" mockall = "0.13" clap = { version = "4.5.19", features = ["derive"] } memmap2 = "0.9.5" From 63bc9b77d2fb4d19eb842ac5831dfc804b6cfac3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 19:29:14 +0000 Subject: [PATCH 2/4] chore(deps): bump actions/checkout from 4 to 5 Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/release-plz.yml | 4 ++-- .github/workflows/rust.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-plz.yml b/.github/workflows/release-plz.yml index e72d9ab..c04ab2e 100644 --- a/.github/workflows/release-plz.yml +++ b/.github/workflows/release-plz.yml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: # `fetch-depth: 0` is needed to clone all the git history, which is necessary to # release from the latest commit of the release PR. @@ -55,7 +55,7 @@ jobs: cancel-in-progress: false steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: # `fetch-depth: 0` is needed to clone all the git history, which is necessary to # determine the next version and build the changelog. diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e4256cb..d40cffd 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: dtolnay/rust-toolchain@stable - name: Build run: cargo build --verbose From fe8cdf1d2153b3427583a6b4869bfd7913a61631 Mon Sep 17 00:00:00 2001 From: Patrick McGleenon Date: Tue, 2 Sep 2025 22:50:16 +0100 Subject: [PATCH 3/4] chore: added Sync to rng --- src/heavykeeper.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/heavykeeper.rs b/src/heavykeeper.rs index 19e70b9..e961e15 100644 --- a/src/heavykeeper.rs +++ b/src/heavykeeper.rs @@ -78,7 +78,7 @@ pub struct TopK { buckets: Vec>, priority_queue: TopKQueue, hasher: RandomState, - random: Box, + random: Box, } pub struct Builder { @@ -88,7 +88,7 @@ pub struct Builder { decay: Option, seed: Option, hasher: Option, - rng: Option>, + rng: Option>, _phantom: std::marker::PhantomData, } @@ -123,7 +123,7 @@ impl TopK { Self::with_components(k, width, depth, decay, hasher, Box::new(SmallRng::seed_from_u64(0))) } - fn with_components(k: usize, width: usize, depth: usize, decay: f64, hasher: RandomState, rng: Box) -> Self { + fn with_components(k: usize, width: usize, depth: usize, decay: f64, hasher: RandomState, rng: Box) -> Self { // Pre-allocate with capacity to avoid resizing let mut buckets = Vec::with_capacity(depth); for _ in 0..depth { @@ -381,6 +381,12 @@ impl TopK { } } +impl Default for Builder { + fn default() -> Self { + Self::new() + } +} + impl Builder { pub fn new() -> Self { Self { @@ -425,7 +431,7 @@ impl Builder { self } - pub fn rng(mut self, rng: R) -> Self { + pub fn rng(mut self, rng: R) -> Self { self.rng = Some(Box::new(rng)); self } From 0a2a6635a8f800c2b57dc5ea65d6c93147bcb77f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 2 Sep 2025 21:56:53 +0000 Subject: [PATCH 4/4] chore: release v0.6.1 --- CHANGELOG.md | 7 +++++++ Cargo.toml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f34a95a..dd40082 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.6.1](https://github.com/pmcgleenon/heavykeeper-rs/compare/v0.6.0...v0.6.1) - 2025-09-02 + +### Other + +- added Sync to rng +- Merge pull request #52 from pmcgleenon/dependabot/cargo/criterion-0.7.0 + ## [0.6.0](https://github.com/pmcgleenon/heavykeeper-rs/compare/v0.5.1...v0.6.0) - 2025-07-27 ### Other diff --git a/Cargo.toml b/Cargo.toml index 6a365e2..e82f6e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "heavykeeper" -version = "0.6.0" +version = "0.6.1" edition = "2021" authors = [ "Patrick McGleenon"] description = "HeavyKeeper is for finding Top-K elephant flows with high precision and low memory footprint."