pion / ice

A Go implementation of ICE
https://pion.ly/
MIT License
424 stars 158 forks source link

Reduce allocation in udp muxed conn addr decode #686

Closed paulwe closed 4 months ago

paulwe commented 4 months ago
BenchmarkAddressEncoding
BenchmarkAddressEncoding/encode
BenchmarkAddressEncoding/encode-10          63219590            16.10 ns/op        0 B/op          0 allocs/op
BenchmarkAddressEncoding/decode
BenchmarkAddressEncoding/decode-10          15798038            74.70 ns/op       80 B/op          3 allocs/op

vs

BenchmarkAddressEncoding
BenchmarkAddressEncoding/encode
BenchmarkAddressEncoding/encode-10          288006478            4.084 ns/op           0 B/op          0 allocs/op
BenchmarkAddressEncoding/decode
BenchmarkAddressEncoding/decode-10          27043725            43.38 ns/op       64 B/op          2 allocs/op
codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 84.21053% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 79.15%. Comparing base (7263f68) to head (0b61fe8).

Files Patch % Lines
udp_muxed_conn.go 84.21% 1 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #686 +/- ## ========================================== + Coverage 79.09% 79.15% +0.06% ========================================== Files 41 41 Lines 3745 3737 -8 ========================================== - Hits 2962 2958 -4 + Misses 549 547 -2 + Partials 234 232 -2 ``` | [Flag](https://app.codecov.io/gh/pion/ice/pull/686/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) | Coverage Δ | | |---|---|---| | [go](https://app.codecov.io/gh/pion/ice/pull/686/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) | `79.15% <84.21%> (+0.06%)` | :arrow_up: | | [wasm](https://app.codecov.io/gh/pion/ice/pull/686/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) | `22.14% <0.00%> (+0.04%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#carryforward-flags-in-the-pull-request-comment) to find out more.

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