You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2018/11/24 23:57:15 UTC
[incubator-plc4x] branch develop updated: - Added min to the stats.
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git
The following commit(s) were added to refs/heads/develop by this push:
new f1561bd - Added min to the stats.
f1561bd is described below
commit f1561bd905f1192f5bef488f788e692524d3f350
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Sun Nov 25 00:57:12 2018 +0100
- Added min to the stats.
---
.../src/main/java/org/apache/plc4x/java/scraper/Scraper.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/Scraper.java b/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/Scraper.java
index 856a73c..44e9fc6 100644
--- a/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/Scraper.java
+++ b/plc4j/utils/scraper/src/main/java/org/apache/plc4x/java/scraper/Scraper.java
@@ -120,8 +120,12 @@ public class Scraper {
scheduler.scheduleAtFixedRate(() -> {
for (Map.Entry<ScrapeJob, ScraperTask> entry : tasks.entries()) {
DescriptiveStatistics statistics = entry.getValue().getLatencyStatistics();
- String msg = String.format(Locale.ENGLISH, "Job statistics (%s, %s) number of requests: %d (%d success, %.1f %% failed, %.1f %% too slow), mean latency: %.2f ms, median: %.2f ms",
- entry.getValue().getJobName(), entry.getValue().getConnectionAlias(), entry.getValue().getRequestCounter(), entry.getValue().getSuccessfullRequestCounter(), entry.getValue().getPercentageFailed(), statistics.apply(new PercentageAboveThreshold(entry.getKey().getScrapeRate() * 1e6)), statistics.getMean() * 1e-6, statistics.getPercentile(50) * 1e-6);
+ String msg = String.format(Locale.ENGLISH, "Job statistics (%s, %s) number of requests: %d (%d success, %.1f %% failed, %.1f %% too slow), min latency: %.2f ms, mean latency: %.2f ms, median: %.2f ms",
+ entry.getValue().getJobName(), entry.getValue().getConnectionAlias(),
+ entry.getValue().getRequestCounter(), entry.getValue().getSuccessfullRequestCounter(),
+ entry.getValue().getPercentageFailed(),
+ statistics.apply(new PercentageAboveThreshold(entry.getKey().getScrapeRate() * 1e6)),
+ statistics.getMin() * 1e-6, statistics.getMean() * 1e-6, statistics.getPercentile(50) * 1e-6);
LOGGER.info(msg);
}
}, 1_000, 1_000, TimeUnit.MILLISECONDS);