Skip to content

Commit

Permalink
Fix histogram
Browse files Browse the repository at this point in the history
`histogram` recorded only step * bin.
This commit adds minimums to it.
  • Loading branch information
hatoo committed Mar 29, 2022
1 parent f19fe96 commit bfbbbc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Unreleased

- Fix histogram to show correct response time
- closes #157

# 0.5.0 (2022-01-01)

- Use clap 3.0.0 instead of structopt
Expand Down
2 changes: 1 addition & 1 deletion src/histogram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ pub fn histogram(values: &[f64], bins: usize) -> Vec<(f64, usize)> {
bucket
.into_iter()
.enumerate()
.map(|(i, v)| (step * (i + 1) as f64, v))
.map(|(i, v)| (min + step * (i + 1) as f64, v))
.collect()
}

0 comments on commit bfbbbc6

Please sign in to comment.