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: Allow non-integral latency thresholds and durations #587

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

sajidanw
Copy link
Contributor

@sajidanw sajidanw commented Oct 28, 2024

Fixes #586.

Adds the integral: false option to Duration.toMillisecond() calls to allow the original non-integral/sub-millisecond threshold values to be provided to CloudWatch. These four lines are the only uses of toMilliseconds in the package.

I also created a new test for the LatencyAlarmFactory class to test these specific cases. To verify that they were working, I ran the tests without the fix in place and got the expected error messages: gist.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@mergify mergify bot merged commit 1eff500 into cdklabs:main Oct 28, 2024
12 checks passed
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.

LatencyAlarmFactory doesn't allow for non-integral latency thresholds
2 participants