-
Notifications
You must be signed in to change notification settings - Fork 5.5k
fault: use FractionalPercent for percent #3978
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
Changes from 15 commits
35dc15a
f105661
4daaac1
4e3a07d
d4a0e76
6652866
f14d3bc
3d56b3f
f197fe2
f98bcc0
c0f9701
ca6fa14
9b1046f
aef3da0
c31bd82
f167d92
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -112,8 +112,8 @@ class Snapshot { | |
| * does not exist or it is not an integer. | ||
| * @param random_value supplies the stable random value to use for determining whether the feature | ||
| * is enabled. | ||
| * @param control max number of buckets for sampling. Sampled value will be in a range of | ||
| * [0, num_buckets). | ||
| * @param num_buckets control max number of buckets for sampling. Sampled value will be in a range | ||
| * of [0, num_buckets). | ||
| * @return true if the feature is enabled. | ||
| */ | ||
| virtual bool featureEnabled(const std::string& key, uint64_t default_value, uint64_t random_value, | ||
|
|
@@ -165,6 +165,11 @@ class Loader { | |
| * @param values the values to merge | ||
| */ | ||
| virtual void mergeValues(const std::unordered_map<std::string, std::string>& values) PURE; | ||
|
|
||
| /** | ||
| * @return RandomGenerator& the random generator. | ||
| */ | ||
| virtual RandomGenerator& random() PURE; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we really need to add this to this interface? I guess it's OK, but can't you just pass the random generator to where you need it? It should be in the filter config factory? This is what we do elsewhere.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thought that I'd have to pass the |
||
| }; | ||
|
|
||
| typedef std::unique_ptr<Loader> LoaderPtr; | ||
|
|
||
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.
Can you do the same for aborts as well ?