jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1817639 - /jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/InfluxdbBackendListenerClient.java
Date Sat, 09 Dec 2017 17:42:10 GMT
Author: pmouawad
Date: Sat Dec  9 17:42:10 2017
New Revision: 1817639

URL: http://svn.apache.org/viewvc?rev=1817639&view=rev
Log:
Add sample url
Make map final and change its name

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

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/InfluxdbBackendListenerClient.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/InfluxdbBackendListenerClient.java?rev=1817639&r1=1817638&r2=1817639&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/InfluxdbBackendListenerClient.java
(original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/InfluxdbBackendListenerClient.java
Sat Dec  9 17:42:10 2017
@@ -93,17 +93,17 @@ public class InfluxdbBackendListenerClie
     private static final int MAX_POOL_SIZE = 1;
     private static final String SEPARATOR = ";"; //$NON-NLS-1$
     private static final Object LOCK = new Object();
-    private static Map<String, String> defaultArgs = new LinkedHashMap<>();
+    private static final Map<String, String> DEFAULT_ARGS = new LinkedHashMap<>();
     static {
-        defaultArgs.put("influxdbMetricsSender", HttpMetricsSender.class.getName());
-        defaultArgs.put("influxdbUrl", "");
-        defaultArgs.put("application", "application name");
-        defaultArgs.put("measurement", DEFAULT_MEASUREMENT);
-        defaultArgs.put("summaryOnly", "false");
-        defaultArgs.put("samplersRegex", ".*");
-        defaultArgs.put("percentiles", "99;95;90");
-        defaultArgs.put("testTitle", "Test name");
-        defaultArgs.put("eventTags", "");
+        DEFAULT_ARGS.put("influxdbMetricsSender", HttpMetricsSender.class.getName());
+        DEFAULT_ARGS.put("influxdbUrl", "http://host_to_change:8086/write?db=jmeter");
+        DEFAULT_ARGS.put("application", "application name");
+        DEFAULT_ARGS.put("measurement", DEFAULT_MEASUREMENT);
+        DEFAULT_ARGS.put("summaryOnly", "false");
+        DEFAULT_ARGS.put("samplersRegex", ".*");
+        DEFAULT_ARGS.put("percentiles", "99;95;90");
+        DEFAULT_ARGS.put("testTitle", "Test name");
+        DEFAULT_ARGS.put("eventTags", "");
     }
 
     private boolean summaryOnly;
@@ -337,7 +337,7 @@ public class InfluxdbBackendListenerClie
         // Check if more row which started with 'TAG_' are filled ( corresponding to user
tag )
         StringBuilder userTagBuilder = new StringBuilder();
         context.getParameterNamesIterator().forEachRemaining(name -> {
-            if (StringUtils.isNotBlank(name) && !defaultArgs.containsKey(name.trim())
+            if (StringUtils.isNotBlank(name) && !DEFAULT_ARGS.containsKey(name.trim())
                     && name.startsWith("TAG_")
                     && StringUtils.isNotBlank(context.getParameter(name))) {
                 final String tagName = name.trim().substring(4);
@@ -424,7 +424,7 @@ public class InfluxdbBackendListenerClie
     @Override
     public Arguments getDefaultParameters() {
         Arguments arguments = new Arguments();
-        defaultArgs.forEach(arguments::addArgument);
+        DEFAULT_ARGS.forEach(arguments::addArgument);
         return arguments;
     }
 }



Mime
View raw message