diff options
author | jonmv <venstad@gmail.com> | 2024-05-09 17:53:16 +0200 |
---|---|---|
committer | jonmv <venstad@gmail.com> | 2024-05-09 17:53:16 +0200 |
commit | cacdf7c9526221c5b8ef86f0de203e815cc69754 (patch) | |
tree | 06a10637c1a1b27a4a946db1eefbaa686291558a /client/go/internal | |
parent | 9084a5bedd010980f755bb5f4800b18bb0577298 (diff) |
Use actual target inflight when updating measured throughput
Diffstat (limited to 'client/go/internal')
-rw-r--r-- | client/go/internal/vespa/document/throttler.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/client/go/internal/vespa/document/throttler.go b/client/go/internal/vespa/document/throttler.go index dea2dc1c67e..0400ba1a150 100644 --- a/client/go/internal/vespa/document/throttler.go +++ b/client/go/internal/vespa/document/throttler.go @@ -57,7 +57,7 @@ func newThrottler(connections int, nowFunc func() time.Time) *dynamicThrottler { func NewThrottler(connections int) Throttler { return newThrottler(connections, time.Now) } func (t *dynamicThrottler) Sent() { - currentInflight := t.targetInflight.Load() + currentInflight := t.TargetInflight() t.sent++ if t.sent*t.sent*t.sent < 100*currentInflight*currentInflight { return |