Skip to content

Commit

Permalink
Dogstatsd: generate values that include the max of inclusive config r…
Browse files Browse the repository at this point in the history
…anges (#891)

* Off by one on the top of ConfRange::Inclusive

* changelog
  • Loading branch information
GeorgeHahn authored May 10, 2024
1 parent dbcf9aa commit 6879780
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
### Fixed
- Range values in the dogstatsd payload will now generate the full inclusive
range. Previously, values were generated up to but not including the `max`
value.

## [0.21.0]
### Changed
Expand Down
2 changes: 1 addition & 1 deletion lading_payload/src/dogstatsd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ where
{
match self {
ConfRange::Constant(c) => *c,
ConfRange::Inclusive { min, max } => rng.gen_range(*min..*max),
ConfRange::Inclusive { min, max } => rng.gen_range(*min..=*max),
}
}
}
Expand Down

0 comments on commit 6879780

Please sign in to comment.