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

Issue #122: Alerts unit bug fix #239

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

wwerkk
Copy link

@wwerkk wwerkk commented Apr 18, 2024

Fixes #122

Results are now accordingly normalized to miliseconds before calculating their ratio, for alerts and threshold to work on results which use different units.

@wwerkk wwerkk changed the title Alerts units fix Issue #122: Alerts unit bug fix Apr 18, 2024
Comment on lines +583 to +584
const prevMs = toMs(prev.value, prev.unit);
const currentMs = toMs(current.value, current.unit);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not all benchmarks are output results in units of time and this logic will apply to all of them which would basically output 0 for all benchmarks that don't use us, ms or s as unit

src/write.ts Outdated Show resolved Hide resolved
Copy link
Member

@ktrz ktrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! I've added some comments.

Additionally, I ran tests and linting on your PR and they both fail. Please remember that all existing tests and linting should pass before the PR can be merged.

One more thing. Could you please add some test cases that cover the issue that this is fixing?

Co-authored-by: Chris Trześniewski <k.trzesniewski@gmail.com>
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.

catch2 time units are ignored when graphing and generating alerts
2 participants