-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
handle trailing period in partial float mode #156
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #156 +/- ##
==========================================
+ Coverage 90.94% 91.13% +0.19%
==========================================
Files 12 12
Lines 2042 2098 +56
Branches 2042 2098 +56
==========================================
+ Hits 1857 1912 +55
- Misses 112 113 +1
Partials 73 73
Continue to review full report in Codecov by Sentry.
|
CodSpeed Performance ReportMerging #156 will degrade performances by 10.1%Comparing Summary
Benchmarks breakdown
|
This seems functionally ok, the slowdown looks like it's a loss of inlining due to the additional re-parse. Can probably rework to fix that. |
def test_partial_float(): | ||
json = b'{"a": 1.2, "b": 2.3, "c": 3.' | ||
parsed = jiter.from_json(json, partial_mode=True) | ||
assert parsed == {"a": 1.2, "b": 2.3, "c": 3.0} | ||
|
||
# test that stopping at every points is ok | ||
for i in range(1, len(json)): | ||
parsed = jiter.from_json(json[:i], partial_mode=True) | ||
assert isinstance(parsed, dict) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only material change in this file (rest is autoformatting, sorry).
Closing as per #146 (comment) - think we'll go in a different direction. |
Fixes #146