-
Notifications
You must be signed in to change notification settings - Fork 23
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
815f173
to
64eb304
Compare
64eb304
to
e46b5e8
Compare
912562b
to
3bacdf0
Compare
@@ -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}) -> |
There was a problem hiding this comment.
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
There was a problem hiding this 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.
3bacdf0
to
67a0941
Compare
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.