-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add JSON Benchmark #1344
Add JSON Benchmark #1344
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1344 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 21 21
Lines 3723 3723
Branches 735 735
=========================================
Hits 3723 3723 Continue to review full report at Codecov.
|
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.
otherwise LGTM.
benchmarks/run.py
Outdated
@@ -182,7 +169,10 @@ def main(): | |||
test = test_class(True) | |||
for j in range(3): | |||
for case in cases: | |||
passed, result = test.validate(case) | |||
if json: |
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.
i think we should try and omit the parsing/validation time from the json test.
Can we do something like
if json:
models = [m for passed, m in (test.validate(c) for c in cases) if passed]
start = datetime.now()
...
...
for m in models:
test.to_json(m)
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.
Certainly, I did want to exclude the parsing time as well. I wasn't sure how deep we'd want to get with that bit.
Co-Authored-By: Samuel Colvin <samcolvin@gmail.com>
FastAPI seems to be failing its db testing test:
Pretty sure that's unrelated? |
looks pretty good, I'm making some tweaks but partially to work out about the fastAPI failures. |
Yep. FastAPI tests were failing, but they are fixed now. I also triggered the tests on this PR again after that and they are now passing again 🎉 (that was actually yesterday). |
Just a heads up, I should have some time tonight and Friday to work on finishing this up; I think I'd like to add some custom subclasses with a |
Change Summary
Pulling out the JSON Benchmarks from #1291 (comment) to be merged first and offer easier performance comparison.
Related issue number
Checklist
changes/<pull request or issue id>-<github username>.md
file added describing change(see changes/README.md for details)