From 8edce55ca91a7505f2243b51c35e007f8d51818f Mon Sep 17 00:00:00 2001 From: "Andy.Chen" Date: Tue, 28 May 2024 18:27:37 +0800 Subject: [PATCH 1/4] docs: stream operator throttle typo --- .../paradox/stream/operators/Source-or-Flow/throttle.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/main/paradox/stream/operators/Source-or-Flow/throttle.md b/docs/src/main/paradox/stream/operators/Source-or-Flow/throttle.md index 38a1cfd57de..d3f38baab31 100644 --- a/docs/src/main/paradox/stream/operators/Source-or-Flow/throttle.md +++ b/docs/src/main/paradox/stream/operators/Source-or-Flow/throttle.md @@ -11,7 +11,7 @@ Limit the throughput to a specific number of elements per time unit, or a specif ## Description -Limit the throughput to a specific number of elements per time unit, or a specific total cost per time unit, where +Limit the throughput to a specific number of elements per time unit, or a specific total cost per-time unit, where a function has to be provided to calculate the individual cost of each element. The throttle operator combines well with the @ref[`queue`](./../Source/queue.md) operator to adapt the speeds on both ends of the `queue`-`throttle` pair. @@ -21,7 +21,7 @@ See also @ref:[Buffers and working with rate](../../stream-rate.md) for related ## Example Imagine the server end of a streaming platform. When a client connects and request a video content, the server -should return the content. Instead of serving a complete video as fast as bandwith allows, `throttle` can be used +should return the content. Instead of serving a complete video as fast as bandwidth allows, `throttle` can be used to limit the network usage to 24 frames per second (let's imagine this streaming platform stores frames, not bytes). Scala @@ -42,7 +42,7 @@ Java : @@snip [Throttle.java](/docs/src/test/java/jdocs/stream/operators/sourceorflow/Throttle.java) { #throttle-with-burst } The extra argument to set the `ThrottleMode` to `shaping` tells `throttle` to make pauses to avoid exceeding -the maximum rate. Alternatively we could set the throttling mode to cause a stream failure when upstream is faster +the maximum rate. Alternatively we could set the throttling mode to `enforcing` cause a stream failure when upstream is faster than the throttle rate. The examples above don't cover all the parameters supported by `throttle` (e.g. `cost`-based throttling). See the From 7bef16dac7f87fc67f902aa5960b722fc5111c90 Mon Sep 17 00:00:00 2001 From: "Andy.Chen" Date: Tue, 28 May 2024 18:31:29 +0800 Subject: [PATCH 2/4] more clarify --- .../main/paradox/stream/operators/Source-or-Flow/throttle.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/main/paradox/stream/operators/Source-or-Flow/throttle.md b/docs/src/main/paradox/stream/operators/Source-or-Flow/throttle.md index d3f38baab31..f9632b8064b 100644 --- a/docs/src/main/paradox/stream/operators/Source-or-Flow/throttle.md +++ b/docs/src/main/paradox/stream/operators/Source-or-Flow/throttle.md @@ -41,8 +41,8 @@ Scala Java : @@snip [Throttle.java](/docs/src/test/java/jdocs/stream/operators/sourceorflow/Throttle.java) { #throttle-with-burst } -The extra argument to set the `ThrottleMode` to `shaping` tells `throttle` to make pauses to avoid exceeding -the maximum rate. Alternatively we could set the throttling mode to `enforcing` cause a stream failure when upstream is faster +The extra argument to set the `ThrottleMode` to `shaping` tells throttle to make pauses to avoid exceeding +the maximum rate. Alternatively we could set the `ThrottleMode` to `enforcing` cause a stream failure when upstream is faster than the throttle rate. The examples above don't cover all the parameters supported by `throttle` (e.g. `cost`-based throttling). See the From ffe38581e7f048329e8a2aa4bfbd43c1ac0716ec Mon Sep 17 00:00:00 2001 From: "AndyChen(Jingzhang)" Date: Tue, 28 May 2024 20:02:57 +0800 Subject: [PATCH 3/4] Update docs/src/main/paradox/stream/operators/Source-or-Flow/throttle.md --- .../main/paradox/stream/operators/Source-or-Flow/throttle.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/main/paradox/stream/operators/Source-or-Flow/throttle.md b/docs/src/main/paradox/stream/operators/Source-or-Flow/throttle.md index f9632b8064b..90ec62e92bd 100644 --- a/docs/src/main/paradox/stream/operators/Source-or-Flow/throttle.md +++ b/docs/src/main/paradox/stream/operators/Source-or-Flow/throttle.md @@ -11,7 +11,7 @@ Limit the throughput to a specific number of elements per time unit, or a specif ## Description -Limit the throughput to a specific number of elements per time unit, or a specific total cost per-time unit, where +Limit the throughput to a specific number of elements per time unit, or a specific total cost per time unit, where a function has to be provided to calculate the individual cost of each element. The throttle operator combines well with the @ref[`queue`](./../Source/queue.md) operator to adapt the speeds on both ends of the `queue`-`throttle` pair. From f69de959983af719d220be077c7e2154c28c8527 Mon Sep 17 00:00:00 2001 From: "AndyChen(Jingzhang)" Date: Tue, 28 May 2024 20:03:16 +0800 Subject: [PATCH 4/4] Update docs/src/main/paradox/stream/operators/Source-or-Flow/throttle.md Co-authored-by: Arnout Engelen --- .../main/paradox/stream/operators/Source-or-Flow/throttle.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/main/paradox/stream/operators/Source-or-Flow/throttle.md b/docs/src/main/paradox/stream/operators/Source-or-Flow/throttle.md index 90ec62e92bd..efc1a1ed396 100644 --- a/docs/src/main/paradox/stream/operators/Source-or-Flow/throttle.md +++ b/docs/src/main/paradox/stream/operators/Source-or-Flow/throttle.md @@ -42,7 +42,7 @@ Java : @@snip [Throttle.java](/docs/src/test/java/jdocs/stream/operators/sourceorflow/Throttle.java) { #throttle-with-burst } The extra argument to set the `ThrottleMode` to `shaping` tells throttle to make pauses to avoid exceeding -the maximum rate. Alternatively we could set the `ThrottleMode` to `enforcing` cause a stream failure when upstream is faster +the maximum rate. Alternatively we could set the `ThrottleMode` to `enforcing` to cause a stream failure when upstream is faster than the throttle rate. The examples above don't cover all the parameters supported by `throttle` (e.g. `cost`-based throttling). See the