Mercurial > stress-tester
changeset 1162:3e845cc6c1c4
minor
author | Devel 1 |
---|---|
date | Mon, 15 Jun 2020 16:17:08 +0200 |
parents | d27ca8daec8a |
children | a3f101f9f9e8 |
files | stress-tester/src/main/java/com/passus/st/emitter/EmitterMetric.java |
diffstat | 1 files changed, 4 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/emitter/EmitterMetric.java Mon Jun 15 15:18:56 2020 +0200 +++ b/stress-tester/src/main/java/com/passus/st/emitter/EmitterMetric.java Mon Jun 15 16:17:08 2020 +0200 @@ -38,7 +38,7 @@ private final Map<SocketAddress, MutableInt> remoteSocketConnections = new HashMap<>(); - private final Map<IpAddress, MutableInt> bindedAddresses = new HashMap<>(); + private final Map<IpAddress, MutableInt> bindAddresses = new HashMap<>(); private final Map<String, MutableInt> errors = new HashMap<>(); @@ -60,7 +60,7 @@ attrs.put("remoteSocketConnections", (Serializable) remoteSocketConnections); attrs.put("errors", (Serializable) errors); attrs.put("dropped", dropped); - attrs.put("bindedAddresses", (Serializable) bindedAddresses); + attrs.put("bindAddresses", (Serializable) bindAddresses); } @Override @@ -127,12 +127,7 @@ } public void addBindAddress(IpAddress ip) { - MutableInt num = bindedAddresses.get(ip); - if (num == null) { - bindedAddresses.put(ip, new MutableInt(1)); - } else { - num.increment(); - } + Metric.incrementCountMap(ip, bindAddresses); } public void addBindSocket(SocketAddress address) { @@ -207,7 +202,7 @@ connectionsErrors.add(emitterMetric.connectionsErrors); Metric.updateCountMap(remoteSocketConnections, emitterMetric.remoteSocketConnections); Metric.updateCountMap(errors, emitterMetric.errors); - Metric.updateCountMap(bindedAddresses, emitterMetric.bindedAddresses); + Metric.updateCountMap(bindAddresses, emitterMetric.bindAddresses); } @Override