summaryrefslogtreecommitdiffstats
path: root/vespa-feed-client/src
diff options
context:
space:
mode:
Diffstat (limited to 'vespa-feed-client/src')
-rw-r--r--vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/DynamicThrottler.java4
-rw-r--r--vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/DynamicThrottlerTest.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/DynamicThrottler.java b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/DynamicThrottler.java
index 567788b8501..3344a372734 100644
--- a/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/DynamicThrottler.java
+++ b/vespa-feed-client/src/main/java/ai/vespa/feed/client/impl/DynamicThrottler.java
@@ -34,7 +34,7 @@ public class DynamicThrottler extends StaticThrottler {
@Override
public void sent(long __, CompletableFuture<HttpResponse> ___) {
double currentInflight = targetInflight();
- if (++sent * sent * sent < 1e2 * currentInflight * currentInflight)
+ if (++sent * sent * sent < 1e3 * currentInflight * currentInflight)
return;
sent = 0;
@@ -63,7 +63,7 @@ public class DynamicThrottler extends StaticThrottler {
// Additionally, smooth the throughput values, to reduce the impact of noise, and reduce jumpiness.
if (j != -1) {
double t = throughputs[j];
- if (k != -1) throughputs[j] = (2 * t + throughputs[i] + s) / 4;
+ if (k != -1) throughputs[j] = (18 * t + throughputs[i] + s) / 20;
s = t;
}
k = j;
diff --git a/vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/DynamicThrottlerTest.java b/vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/DynamicThrottlerTest.java
index 7e07fc6e116..cea5d32a55a 100644
--- a/vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/DynamicThrottlerTest.java
+++ b/vespa-feed-client/src/test/java/ai/vespa/feed/client/impl/DynamicThrottlerTest.java
@@ -17,7 +17,7 @@ class DynamicThrottlerTest {
DynamicThrottler throttler = new DynamicThrottler(new FeedClientBuilderImpl(List.of(URI.create("http://localhost:8080"))));
assertEquals(16, throttler.targetInflight());
- for (int i = 0; i < 30; i++) {
+ for (int i = 0; i < 65; i++) {
throttler.sent(1, null);
throttler.success();
}