-
Notifications
You must be signed in to change notification settings - Fork 94
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Requirements
Currently, the fractional operator is percentage-based; meaning you must specify the relative distribution of the variants in terms of a percentage. I believe we should change this instead to be a relative weight, meaning that the integers do not need to sum to 100. For example, this fractional:
"fractional": [
[
"red",
25
],
[
"blue",
25
],
[
"green",
25
],
[
"grey",
25
]
]Would remain valid, but could also be expressed as:
"fractional": [
[
"red",
1
],
[
"blue",
1
],
[
"green",
1
],
[
"grey",
1
]
]We could even make the number in the bucket optional, so that an even split would be assumed if none was provided (we could simply default to 1).
Benefits:
- adding new buckets becomes easy, there's no need to alter previous buckets
- supports much finer targeting
- clear and consistent support across implementations for targeting finer than a single percentage (I don't believe all impls currently support non-integer distributions)
- easy a clear support for fractions that aren't factors of 100 (
1/1/1vs33/33/34)
- non breaking (current percentage based rules will still work)
Challenges:
- we should specify max values for the integers, and perhaps a max array length for the bucket array
If there's a general consensus to this, I will create some child issues in the relevant repositories and use this issue as the parent "tracking" issue.
beeme1mr, Kavindu-Dodan and colebaileygit
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
Done