Skip to content
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

Implement and improve some benchmarks #24

Merged
merged 5 commits into from
Oct 10, 2024
Merged

Implement and improve some benchmarks #24

merged 5 commits into from
Oct 10, 2024

Conversation

ystreet
Copy link
Owner

@ystreet ystreet commented Oct 10, 2024

No description provided.

Allocate the initial size with Vec::with_capcity() and then fill it
instead of using possibly 2 extra reallocs.

Decreases attribute write benchmark times by at least 40%.
Improves message writing times by ~30%
Improves write throughput with supported attributes by around 25%
Copy link

codecov bot commented Oct 10, 2024

Codecov Report

Attention: Patch coverage is 66.38177% with 118 lines in your changes missing coverage. Please review.

Project coverage is 84.32%. Comparing base (db38557) to head (56561d2).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
stun-types/src/message.rs 60.00% 42 Missing ⚠️
stun-types/src/attribute/error.rs 38.23% 21 Missing ⚠️
stun-types/src/attribute/mod.rs 69.23% 16 Missing ⚠️
stun-types/src/attribute/alternate.rs 25.00% 12 Missing ⚠️
stun-types/src/attribute/password_algorithm.rs 72.41% 8 Missing ⚠️
stun-types/src/attribute/ice.rs 68.18% 7 Missing ⚠️
stun-types/src/attribute/integrity.rs 50.00% 6 Missing ⚠️
stun-types/src/attribute/fingerprint.rs 42.85% 4 Missing ⚠️
stun-types/benches/attribute_write.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #24      +/-   ##
==========================================
- Coverage   90.99%   84.32%   -6.67%     
==========================================
  Files          18       19       +1     
  Lines        1321     1563     +242     
==========================================
+ Hits         1202     1318     +116     
- Misses        119      245     +126     

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

@ystreet ystreet merged commit f03c3db into main Oct 10, 2024
8 of 10 checks passed
@ystreet ystreet deleted the benchmarks branch October 10, 2024 16:12
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