-
Notifications
You must be signed in to change notification settings - Fork 0
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
Parse report_json
files with serde
#18
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #18 +/- ##
==========================================
- Coverage 98.69% 98.62% -0.07%
==========================================
Files 20 20
Lines 7333 6962 -371
==========================================
- Hits 7237 6866 -371
Misses 96 96
☔ View full report in Codecov by Sentry. |
04024f7
to
7afa7eb
Compare
1a6bd5f
to
331ce5a
Compare
I updated this a little bit, adding divans I’m a bit surprised myself by the results. Looking more in-depth into how the In particular, those totals are parsed in full fidelity, but thrown away and never used, as all the totals are calculated on-demand instead: codecov-rs/src/parsers/pyreport/report_json.rs Lines 86 to 89 in 77b522f
The serde code is using Related to memory usage optimizations, I have used by very own The memory usage is effectively:
We can go lower for |
a5eae16
to
ae71dd1
Compare
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.
thanks for taking care of this! now that python doesn't emit the session_totals
bloat anymore and the p99 report json size is stable around 8mb we don't need to be paranoid about fitting everything in memory
love the perf win and the big red diff
if i had noticed this was ready for review i'd have let you merge it before merging #27, sorry! |
Replaces the hand-written `winnow`-based parser with a bunch of struct definitions along with deriving `serde::Deserialize`.
ae71dd1
to
05f2083
Compare
Replaces the hand-written
winnow
-based parser with a bunch of struct definitions along with derivingserde::Deserialize
.The Serde definitions look very simple, and parsing performance seems to be 8-20x faster than the hand built parser, and doing a lot less less intermediate allocations.
This is a previous comparison: