diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2020-12-01 21:32:13 +0100 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2020-12-01 21:32:13 +0100 |
commit | b38ce2dd957fa3fd4ddd86a7564a4cd095fdb06f (patch) | |
tree | c84e01a76995e1d6f3c9d820b9eeef75f42c2bfc /messagebus | |
parent | a9aa229c03145beba34c3cf2e8db21169fac2e8f (diff) |
sqrt(weight) provides almost proportional resource shares
Diffstat (limited to 'messagebus')
-rw-r--r-- | messagebus/src/main/java/com/yahoo/messagebus/DynamicThrottlePolicy.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/messagebus/src/main/java/com/yahoo/messagebus/DynamicThrottlePolicy.java b/messagebus/src/main/java/com/yahoo/messagebus/DynamicThrottlePolicy.java index 73270b032eb..93c63112b46 100644 --- a/messagebus/src/main/java/com/yahoo/messagebus/DynamicThrottlePolicy.java +++ b/messagebus/src/main/java/com/yahoo/messagebus/DynamicThrottlePolicy.java @@ -202,13 +202,13 @@ public class DynamicThrottlePolicy extends StaticThrottlePolicy { /** * Sets the weight for this client. The larger the value, the more resources * will be allocated to this clients. Resources are shared between clients - * proportiannally to their weights. + * proportionally to the set weights. * * @param weight the weight to set * @return this, to allow chaining */ public DynamicThrottlePolicy setWeight(double weight) { - this.weight = weight; + this.weight = Math.pow(weight, 0.5); return this; } |