jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1742559 - /jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/graphite/GraphiteBackendListenerClient.java
Date Fri, 06 May 2016 16:16:45 GMT
Author: sebb
Date: Fri May  6 16:16:44 2016
New Revision: 1742559

URL: http://svn.apache.org/viewvc?rev=1742559&view=rev
Log:
Fetch key once

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/graphite/GraphiteBackendListenerClient.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/graphite/GraphiteBackendListenerClient.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/graphite/GraphiteBackendListenerClient.java?rev=1742559&r1=1742558&r2=1742559&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/graphite/GraphiteBackendListenerClient.java
(original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/graphite/GraphiteBackendListenerClient.java
Fri May  6 16:16:44 2016
@@ -146,11 +146,12 @@ public class GraphiteBackendListenerClie
         long timestampInSeconds = TimeUnit.SECONDS.convert(System.currentTimeMillis(), TimeUnit.MILLISECONDS);
         synchronized (LOCK) {
             for (Map.Entry<String, SamplerMetric> entry : getMetricsPerSampler().entrySet())
{
-                SamplerMetric metric = entry.getValue();
-                if(entry.getKey().equals(CUMULATED_METRICS)) {
+                final String key = entry.getKey();
+                final SamplerMetric metric = entry.getValue();
+                if(key.equals(CUMULATED_METRICS)) {
                     addMetrics(timestampInSeconds, ALL_CONTEXT_NAME, metric);
                 } else {
-                    addMetrics(timestampInSeconds, AbstractGraphiteMetricsSender.sanitizeString(entry.getKey()),
metric);                
+                    addMetrics(timestampInSeconds, AbstractGraphiteMetricsSender.sanitizeString(key),
metric);                
                 }
                 // We are computing on interval basis so cleanup
                 metric.resetForTimeInterval();



Mime
View raw message