nats-io / nats.c

A C client for NATS
Apache License 2.0
390 stars 137 forks source link

[CHANGED] refactored nats.c, prep for js_PullSubscribeAsync #778

Closed levb closed 2 months ago

levb commented 3 months ago

This is a replacement for https://github.com/nats-io/nats.c/pull/772 that had too many changes/re-bases and had grown too complicated for review.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 74.38380% with 291 lines in your changes missing coverage. Please review.

Project coverage is 68.80%. Comparing base (1e675d6) to head (50506e8).

Files Patch % Lines
src/glib/glib.c 69.53% 21 Missing and 57 partials :warning:
src/glib/glib_last_error.c 64.82% 18 Missing and 33 partials :warning:
src/nats.c 56.97% 28 Missing and 9 partials :warning:
src/sub.c 83.48% 12 Missing and 25 partials :warning:
src/glib/glib_dispatch_pool.c 64.93% 11 Missing and 16 partials :warning:
src/glib/glib_timer.c 81.50% 3 Missing and 24 partials :warning:
src/glib/glib_async_cb.c 82.81% 5 Missing and 6 partials :warning:
src/glib/glib_gc.c 78.57% 2 Missing and 4 partials :warning:
src/js.c 81.48% 1 Missing and 4 partials :warning:
src/timer.c 25.00% 1 Missing and 2 partials :warning:
... and 6 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## lev-bench2 #778 +/- ## ============================================== - Coverage 68.84% 68.80% -0.04% ============================================== Files 39 49 +10 Lines 15238 15206 -32 Branches 3153 3135 -18 ============================================== - Hits 10491 10463 -28 - Misses 1680 1701 +21 + Partials 3067 3042 -25 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

levb commented 3 months ago

performance benchmark: https://github.com/nats-io/nats.c/actions/runs/10267478369/job/28408116810?pr=778

Step: compare benchmarks

image
levb commented 3 months ago

@kozlovic Can I please get an LGTM on https://github.com/nats-io/nats.c/pull/777 (the base) so I can merge cleanly?