Skip to content

Issue #122: Alerts unit bug fix#239

Closed
wwerkk wants to merge 4 commits intobenchmark-action:masterfrom
wwerkk:wwerkk/issue122
Closed

Issue #122: Alerts unit bug fix#239
wwerkk wants to merge 4 commits intobenchmark-action:masterfrom
wwerkk:wwerkk/issue122

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

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?

wwerkk and others added 2 commits May 2, 2024 15:49
Co-authored-by: Chris Trześniewski <k.trzesniewski@gmail.com>
@ktrz
Copy link
Member

ktrz commented Sep 2, 2025

Fixed by #318

@ktrz ktrz closed this Sep 2, 2025
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