From b1faef1cdf0ca6d81a7609209909f525b1223122 Mon Sep 17 00:00:00 2001
From: Andreas Fankhauser <23085769+hiddenalpha@users.noreply.github.com>
Date: Tue, 28 May 2024 18:31:00 +0200
Subject: [PATCH] Use quota to limit parallelity to publish queue statistics.
Related: SDCISA-15833, #170, #177, https://github.com/swisspost/vertx-rest-storage/pull/186, https://github.com/swisspost/gateleen/pull/577, #181, https://github.com/swisspost/gateleen/issues/493, https://github.com/swisspost/vertx-rest-storage/issues/188
---
.../org/swisspush/redisques/RedisQues.java | 71 ++++++++-----------
.../redisques/performance/JavaGcStats.java | 6 +-
2 files changed, 32 insertions(+), 45 deletions(-)
diff --git a/src/main/java/org/swisspush/redisques/RedisQues.java b/src/main/java/org/swisspush/redisques/RedisQues.java
index b3828d8..6563cc8 100644
--- a/src/main/java/org/swisspush/redisques/RedisQues.java
+++ b/src/main/java/org/swisspush/redisques/RedisQues.java
@@ -438,26 +438,6 @@ private void initialize() {
registerQueueCheck();
}
- class Task {
- private final String queueName;
- private final DequeueStatistic dequeueStatistic;
- Task(String queueName, DequeueStatistic dequeueStatistic) {
- this.queueName = queueName;
- this.dequeueStatistic = dequeueStatistic;
- }
- Future> startFuture = Future.succeededFuture(new ArrayList<>());
- // chain the futures sequentially to execute tasks
- Future
> resultFuture = entryList.stream()
- .reduce(startFuture, (future, task) -> future.compose(previousResults -> {
- // perform asynchronous task
- return task.execute().compose(taskResult -> {
- // append task result to previous results
- previousResults.add(taskResult);
+ upperBoundParallel.request(redisMonitoringReqQuota, null, new UpperBoundParallel.Mentor
Example 1: If gcFrac05 is 0.25, this means that one fourth of the - * execution time got into garbage collection.
+ * execution time got into garbage collection during the past 5 + * minutes. * *Example 2: If gcFrac15 is 0.03, this means that 3 percent of - * execution time got into garbage collection.
+ * execution time got into garbage collection during the past 15 + * minutes. */ public float gcFrac01 = NaN, gcFrac05 = NaN, gcFrac15 = NaN;