summaryrefslogtreecommitdiffstats
path: root/messagebus
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2021-08-18 10:45:00 +0200
committerJon Marius Venstad <venstad@gmail.com>2021-08-18 10:45:00 +0200
commitd1a979fc2aeee0df600bcb6bca5f643e8e71e9d5 (patch)
treeb175c212f41f63ea7e68394a8dd3e2187e8ff05e /messagebus
parent5b61adcd248e9bd9f191c21c6d0a6dc39cf78d60 (diff)
Cut the heaviest dynamic throttle policy mini-benchmarks
Diffstat (limited to 'messagebus')
-rw-r--r--messagebus/src/test/java/com/yahoo/messagebus/DynamicThrottlePolicyTest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/messagebus/src/test/java/com/yahoo/messagebus/DynamicThrottlePolicyTest.java b/messagebus/src/test/java/com/yahoo/messagebus/DynamicThrottlePolicyTest.java
index 63747803e75..09fb1110fea 100644
--- a/messagebus/src/test/java/com/yahoo/messagebus/DynamicThrottlePolicyTest.java
+++ b/messagebus/src/test/java/com/yahoo/messagebus/DynamicThrottlePolicyTest.java
@@ -97,7 +97,7 @@ public class DynamicThrottlePolicyTest {
/** Sort of a dummy test, as the conditions are perfect. In a more realistic scenario, below, the algorithm needs luck to climb this high. */
@Test
public void singlePolicySingleWorkerWithIncreasingParallelism() {
- for (int i = 0; i < 5; i++) {
+ for (int i = 0; i < 4; i++) {
CustomTimer timer = new CustomTimer();
DynamicThrottlePolicy policy = new DynamicThrottlePolicy(timer);
int scaleFactor = (int) Math.pow(10, i);
@@ -120,11 +120,11 @@ public class DynamicThrottlePolicyTest {
/** A more realistic test, where throughput gradually flattens with increasing window size, and with more variance in throughput. */
@Test
public void singlePolicyIncreasingWorkersWithNoParallelism() {
- for (int i = 0; i < 5; i++) {
+ for (int i = 0; i < 4; i++) {
CustomTimer timer = new CustomTimer();
DynamicThrottlePolicy policy = new DynamicThrottlePolicy(timer);
int scaleFactor = (int) Math.pow(10, i);
- long operations = 5_000L * scaleFactor;
+ long operations = 2_000L * scaleFactor;
// workPerSuccess determines the latency of the simulated server, which again determines the impact of the
// synthetic attractors of the algorithm, around latencies which give (close to) integer log10(1 / latency).
// With a value of 5, the impact is that the algorithm is pushed upwards slightly above 10k window size,
@@ -143,7 +143,7 @@ public class DynamicThrottlePolicyTest {
double maxMaxPending = numberOfWorkers * maximumTasksPerWorker;
assertInRange(minMaxPending, summary.averagePending, maxMaxPending);
assertInRange(minMaxPending, summary.averageWindows[0], maxMaxPending);
- assertInRange(1, summary.inefficiency, 1 + 0.2 * i); // Even slower ramp-up.
+ assertInRange(1, summary.inefficiency, 1 + 0.25 * i); // Even slower ramp-up.
assertInRange(0, summary.waste, 0);
}
}