Mercurial > stress-tester
changeset 1161:d27ca8daec8a
EmitterMetric bugfix
author | Devel 2 |
---|---|
date | Mon, 15 Jun 2020 15:18:56 +0200 |
parents | 2d5c66bd2224 |
children | 3e845cc6c1c4 |
files | stress-tester/src/main/java/com/passus/st/emitter/EmitterMetric.java |
diffstat | 1 files changed, 3 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/emitter/EmitterMetric.java Mon Jun 15 14:37:41 2020 +0200 +++ b/stress-tester/src/main/java/com/passus/st/emitter/EmitterMetric.java Mon Jun 15 15:18:56 2020 +0200 @@ -205,27 +205,9 @@ establishedConnections.add(emitterMetric.establishedConnections); closedConnections.add(emitterMetric.closedConnections); connectionsErrors.add(emitterMetric.connectionsErrors); - - for (Map.Entry<SocketAddress, MutableInt> entry : emitterMetric.remoteSocketConnections.entrySet()) { - MutableInt value = remoteSocketConnections.get(entry.getKey()); - if (value == null) { - remoteSocketConnections.put(entry.getKey(), new MutableInt(entry.getValue())); - } else { - value.add(entry.getValue()); - } - } - - for (Map.Entry<String, MutableInt> errorEntry : emitterMetric.errors.entrySet()) { - MutableInt otherCount = errorEntry.getValue(); - MutableInt thisCount = errors.get(errorEntry.getKey()); - if (thisCount == null) { - errors.put(errorEntry.getKey(), otherCount); - } else { - thisCount.add(otherCount); - } - } - - //bindedSockets.addAll(emitterMetric.bindedSockets); + Metric.updateCountMap(remoteSocketConnections, emitterMetric.remoteSocketConnections); + Metric.updateCountMap(errors, emitterMetric.errors); + Metric.updateCountMap(bindedAddresses, emitterMetric.bindedAddresses); } @Override