Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix percentile calculation, there was an issue with sorting #60

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

bens
Copy link
Collaborator

@bens bens commented Mar 12, 2024

The last item of the durations array was being left out of the sort, and sometimes I was seeing larger p75 values than p995, which is nonsensical. I've fixed the issue and added some tests and asserts that check for sanity.

The average and standard deviation functions looked like they could use some tweaks too.

@bens bens force-pushed the percentile-fix branch 2 times, most recently from ab69bf3 to c7c249c Compare March 12, 2024 12:59
The last item of the durations array was being left out of the sort, and
sometimes I was seeing larger p75 values than p995, which is nonsensical. I've
fixed the issue and added some tests and asserts that check for sanity.

The average and standard deviation functions looked like they could use some
tweaks too.
tests.zig Show resolved Hide resolved
zbench.zig Show resolved Hide resolved
zbench.zig Show resolved Hide resolved
@hendriknielaender hendriknielaender merged commit cdbbd93 into hendriknielaender:main Mar 12, 2024
5 checks passed
@bens bens deleted the percentile-fix branch March 15, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants