diff options
author | Jon Marius Venstad <jonmv@users.noreply.github.com> | 2020-12-03 15:45:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-03 15:45:57 +0100 |
commit | 3abdb35128ce98f2dd0cf2dfeb36494cf8a60687 (patch) | |
tree | ad42fb2ac9372966ff0901946a4bf443a1ad64fa /messagebus | |
parent | 7005bf273d8ed242dcecd7775e5982262192ffbb (diff) |
Apply suggestions from code review
Diffstat (limited to 'messagebus')
-rw-r--r-- | messagebus/src/main/java/com/yahoo/messagebus/DynamicThrottlePolicy.java | 3 |
1 files changed, 1 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 5a64ec5f929..ab09c9f5720 100644 --- a/messagebus/src/main/java/com/yahoo/messagebus/DynamicThrottlePolicy.java +++ b/messagebus/src/main/java/com/yahoo/messagebus/DynamicThrottlePolicy.java @@ -10,7 +10,7 @@ import java.util.logging.Logger; * This is an implementation of the {@link ThrottlePolicy} that offers dynamic limits to the number of pending messages a * {@link SourceSession} is allowed to have. Pending means the number of sent messages that have not been replied to yet. * <p> - * The algorithm works by increasing the number of messages allowed to be pending, the <em>winidow size</em>, until + * The algorithm works by increasing the number of messages allowed to be pending, the <em>window size</em>, until * this no longer increases throughput. At this point, the algorithm is driven by synthetic attraction towards latencies * which satisfy <code>log10(1 / latency) % 1 = e</code>, for some constant <code>0 < e < 1</code>. Weird? Most certainly! * </p><p> @@ -148,7 +148,6 @@ public class DynamicThrottlePolicy extends StaticThrottlePolicy { period *= 0.1; } double efficiency = throughput * period / windowSize; // "efficiency" is a strange name. This is where on the level it is. - if (Math.random() < 1e-2) System.err.println(efficiency); if (efficiency < efficiencyThreshold) { windowSize = Math.min(windowSize * windowSizeBackOff, windowSize - decrementFactor * windowSizeIncrement); localMaxThroughput = 0; |