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

Migrate from inside shapers to opuntia #4187

Merged
merged 3 commits into from
Dec 20, 2023
Merged

Migrate from inside shapers to opuntia #4187

merged 3 commits into from
Dec 20, 2023

Conversation

NelsonVides
Copy link
Collaborator

@NelsonVides NelsonVides commented Dec 6, 2023

There's the repo called https://github.com/NelsonVides/opuntia where I pretty much moved shaper code and improved and tested that it really shapes the traffic with certainty (current code because of rounding errors could pass up to 49.99% more than allowed).

Also that codebase is tested using PropER's stateful testing using state machines modelling, which is what I really wanted to get at, there.

This PR simply uses that and functionality from wpool to remove internal shaper code and mongoose_shaper_sup.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

Copy link

codecov bot commented Dec 7, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (5b8fd70) 84.24% compared to head (565e636) 84.30%.
Report is 3 commits behind head on master.

Files Patch % Lines
src/mam/mod_mam_utils.erl 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4187      +/-   ##
==========================================
+ Coverage   84.24%   84.30%   +0.05%     
==========================================
  Files         551      549       -2     
  Lines       33473    33419      -54     
==========================================
- Hits        28201    28175      -26     
+ Misses       5272     5244      -28     

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

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@NelsonVides NelsonVides marked this pull request as ready for review December 7, 2023 21:30
Copy link
Contributor

@arcusfelis arcusfelis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added some comments :)
looks good

src/mongoose_shapers.erl Outdated Show resolved Hide resolved
src/mongoose_shapers.erl Outdated Show resolved Hide resolved
src/mongoose_shapers.erl Outdated Show resolved Hide resolved
src/mongooseim.app.src Show resolved Hide resolved
@mongoose-im

This comment was marked as outdated.

Copy link
Contributor

@arcusfelis arcusfelis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Member

@chrzaszcz chrzaszcz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a few comments. Apart from what I added in NelsonVides/opuntia#1 (review), I think that we could keep mongoose_shaper as the interface to shapers, because now we sometimes use this module, and for some functions we call opuntia directly.

src/c2s/mongoose_c2s.erl Show resolved Hide resolved
src/mam/mod_mam_utils.erl Show resolved Hide resolved
src/mongoose_shaper.erl Outdated Show resolved Hide resolved
@mongoose-im

This comment was marked as outdated.

@mongoose-im

This comment was marked as outdated.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Dec 20, 2023

elasticsearch_and_cassandra_26 / elasticsearch_and_cassandra_mnesia / 565e636
Reports root/ big
OK: 370 / Failed: 0 / User-skipped: 40 / Auto-skipped: 0


small_tests_25 / small_tests / 565e636
Reports root / small


small_tests_26 / small_tests / 565e636
Reports root / small


small_tests_26_arm64 / small_tests / 565e636
Reports root / small


ldap_mnesia_25 / ldap_mnesia / 565e636
Reports root/ big
OK: 2268 / Failed: 0 / User-skipped: 847 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 565e636
Reports root/ big
OK: 4239 / Failed: 0 / User-skipped: 102 / Auto-skipped: 0


dynamic_domains_mysql_redis_26 / mysql_redis / 565e636
Reports root/ big
OK: 4206 / Failed: 0 / User-skipped: 135 / Auto-skipped: 0


ldap_mnesia_26 / ldap_mnesia / 565e636
Reports root/ big
OK: 2268 / Failed: 0 / User-skipped: 847 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 565e636
Reports root/ big
OK: 4239 / Failed: 0 / User-skipped: 102 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 565e636
Reports root/ big
OK: 4628 / Failed: 0 / User-skipped: 109 / Auto-skipped: 0


pgsql_cets_26 / pgsql_cets / 565e636
Reports root/ big
OK: 4283 / Failed: 0 / User-skipped: 110 / Auto-skipped: 0


internal_mnesia_26 / internal_mnesia / 565e636
Reports root/ big
OK: 2408 / Failed: 0 / User-skipped: 707 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_26 / odbc_mssql_mnesia / 565e636
Reports root/ big
OK: 4236 / Failed: 0 / User-skipped: 105 / Auto-skipped: 0


mysql_redis_26 / mysql_redis / 565e636
Reports root/ big
OK: 4607 / Failed: 0 / User-skipped: 130 / Auto-skipped: 0


pgsql_mnesia_26 / pgsql_mnesia / 565e636
Reports root/ big
OK: 4628 / Failed: 0 / User-skipped: 109 / Auto-skipped: 0


mssql_mnesia_26 / odbc_mssql_mnesia / 565e636
Reports root/ big
OK: 4625 / Failed: 0 / User-skipped: 112 / Auto-skipped: 0

Copy link
Member

@chrzaszcz chrzaszcz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👌

@chrzaszcz chrzaszcz merged commit 2235b76 into master Dec 20, 2023
4 checks passed
@chrzaszcz chrzaszcz deleted the shapers branch December 20, 2023 11:48
@jacekwegr jacekwegr added this to the 6.2.1 milestone Apr 3, 2024
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.

5 participants