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

Accept ranges of users in amoc_coordinator #174

Merged
merged 3 commits into from
Mar 5, 2024
Merged

Conversation

NelsonVides
Copy link
Collaborator

Sometimes we want to add some variance to the test and we want the coordinator to choose groups of roughly N users instead of uniformly choosing all groups to be of the exact same size. For this, we could give the coordinator a range of the type {Min, Max} were every group will be chosen to have N in the interval [Min, Max]. rand:uniform/1 can be used to ensure that the distribution will be pretty uniform, and in a sufficiently large scale, converge to N.

As a good to have, the coordinator could keep statistics of the distribution of N in the interval.

@codecov-commenter
Copy link

codecov-commenter commented Dec 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.12%. Comparing base (f1d9152) to head (67a0941).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #174      +/-   ##
==========================================
+ Coverage   75.08%   75.12%   +0.04%     
==========================================
  Files          31       31              
  Lines        1160     1166       +6     
==========================================
+ Hits          871      876       +5     
- Misses        289      290       +1     

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

@NelsonVides NelsonVides force-pushed the coordinator/ranges branch 2 times, most recently from 912562b to 3bacdf0 Compare February 21, 2024 22:33
@NelsonVides NelsonVides marked this pull request as ready for review February 21, 2024 22:39
@@ -125,6 +130,12 @@ safe_executions(Fun, Args) ->
_:_ -> ok
end.

-spec calculate_n(amoc_coordinator:num_of_users()) -> all | pos_integer().
calculate_n({Min, Diff}) ->
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe could keep {Min, Max} format everywhere, not two formats

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.

looks ok

Sometimes we want to add some variance to the test and we want the coordinator
to choose groups of roughly N users instead of uniformly choosing all groups to
be of the exact same size. For this, we could give the coordinator a range of
the type {Min, Max} were every group will be chosen to have N in the interval
[Min, Max]. `rand:uniform/1` can be used to ensure that the distribution will be
pretty uniform, and in a sufficiently large scale, converge to N.

As a good to have, the coordinator could keep statistics of the distribution of
N in the interval.
@arcusfelis arcusfelis merged commit d04348c into master Mar 5, 2024
6 checks passed
@arcusfelis arcusfelis deleted the coordinator/ranges branch March 5, 2024 13:42
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.

3 participants