jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1854564 - /jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/HttpMetricsSender.java
Date Fri, 01 Mar 2019 08:45:02 GMT
Author: pmouawad
Date: Fri Mar  1 08:45:02 2019
New Revision: 1854564

URL: http://svn.apache.org/viewvc?rev=1854564&view=rev
Log:
Simplify code

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/HttpMetricsSender.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/HttpMetricsSender.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/HttpMetricsSender.java?rev=1854564&r1=1854563&r2=1854564&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/HttpMetricsSender.java
(original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/HttpMetricsSender.java
Fri Mar  1 08:45:02 2019
@@ -143,15 +143,14 @@ class HttpMetricsSender extends Abstract
      */
     @Override
     public void writeAndSendMetrics() {
-        List<MetricTuple> tempMetrics;
+        List<MetricTuple> copyMetrics;
         synchronized (lock) {
             if(metrics.isEmpty()) {
                 return;
             }
-            tempMetrics = metrics;
-            metrics = new ArrayList<>(tempMetrics.size());            
+            copyMetrics = metrics;
+            metrics = new ArrayList<>(copyMetrics.size());
         }
-        final List<MetricTuple> copyMetrics = tempMetrics;
         if (!copyMetrics.isEmpty()) {
             try {
                 if(httpRequest == null) {



Mime
View raw message