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/#160 max value float #164

Merged
merged 8 commits into from
Jun 14, 2019
Merged

Fix/#160 max value float #164

merged 8 commits into from
Jun 14, 2019

Conversation

BalloonWen
Copy link
Contributor

@BalloonWen BalloonWen commented Jun 11, 2019

related issue: #160
did a performance test, it seems no big performance impact use BigDecimal to do the comparison, to use BigDecimal comparison will reduce a lot of defects.

tested with comparing with "1E39", "-1000" 200000 times after change. The average time is
2312ms
tested with comparing with "1000.1", "1000" 200000 times before change. The average time is 2326.8ms

…he compare node is integer type, otherwise means one of schema or compare node is with decimal, so convert it to BigDecimal to do the compare.

-change some edge test cases, due to the way of measuring is changed, some edge scenarios don't apply anymore.
-change logback-test from debug to error level due to it may affect performance test
…. the time consuming diff is very small after the change using BigDecimal
…ilar logic to MaximumValidator

-added test cases
@stevehu stevehu merged commit 17e90d8 into master Jun 14, 2019
@stevehu stevehu deleted the fix/#160-max-value-float branch June 14, 2019 12:25
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.

3 participants