Skip to content

Comments

v1.9.5 - Optimize Obj->JSON->GZip & AutoGZipSink#131

Merged
gmpassos merged 13 commits intomasterfrom
json-gzip
Jul 27, 2025
Merged

v1.9.5 - Optimize Obj->JSON->GZip & AutoGZipSink#131
gmpassos merged 13 commits intomasterfrom
json-gzip

Conversation

@gmpassos
Copy link
Contributor

  • APIServer:

    • _resolveBodyImpl:
      • Log errors while encoding payload to JSON.
      • Catch OutOfMemoryError and log.
      • Return apiResponse.asError on errors.
    • _jsonEncodePayload:
      • Now uses AutoGZipSink and Json.encodeToSink to stream JSON encoding with automatic GZip compression based on output size.
  • Added AutoGZipSink, GZipSink and BytesSink and BytesBuffer.

  • Json:

    • Added encodeToSink.
  • reflection_factory: ^2.5.2

  • swiss_knife: ^3.3.3

  • test: ^1.26.3

gmpassos added 12 commits July 26, 2025 00:35
- reflection_factory: ^2.5.2
- swiss_knife: ^3.3.3

- test: ^1.26.3
  - `_resolveBodyImpl`:
    - Catch `OutOfMemoryError` and log.
    - Log errors while encoding payload to JSON.
  - `_resolveBodyImpl`:
    - Log errors while encoding payload to JSON.
    - Catch `OutOfMemoryError` and log.
    - Return `apiResponse.asError` on errors.
  - Added `encodeToSink`.
  - Added `encodeToSink`.
    - Now uses `AutoGZipSink` and `Json.encodeToSink` to stream JSON encoding with automatic GZip compression based on output size.
@codecov
Copy link

codecov bot commented Jul 27, 2025

Codecov Report

❌ Patch coverage is 82.14286% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.50%. Comparing base (db6a807) to head (b6da8d6).
⚠️ Report is 14 commits behind head on master.

Files with missing lines Patch % Lines
lib/src/bones_api_server.dart 69.69% 20 Missing ⚠️
lib/src/bones_api_utils_sink.dart 89.89% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #131      +/-   ##
==========================================
+ Coverage   65.34%   65.50%   +0.16%     
==========================================
  Files          60       61       +1     
  Lines       20168    20311     +143     
==========================================
+ Hits        13179    13305     +126     
- Misses       6989     7006      +17     
Flag Coverage Δ
unittests 65.50% <82.14%> (+0.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gmpassos gmpassos merged commit c41475a into master Jul 27, 2025
5 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.

1 participant