jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1643254 - in /jmeter/trunk: src/components/org/apache/jmeter/visualizers/backend/graphite/GraphiteBackendListenerClient.java xdocs/usermanual/component_reference.xml
Date Fri, 05 Dec 2014 12:19:44 GMT
Author: pmouawad
Date: Fri Dec  5 12:19:44 2014
New Revision: 1643254

URL: http://svn.apache.org/viewvc?rev=1643254&view=rev
Log:
Bug 57246 - BackendListener : Create a Graphite implementation
Switch separator to semicolon for all parameter
Replace HashMap by Map
Bugzilla Id: 57246

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/graphite/GraphiteBackendListenerClient.java
    jmeter/trunk/xdocs/usermanual/component_reference.xml

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=1643254&r1=1643253&r2=1643254&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 Dec  5 12:19:44 2014
@@ -65,6 +65,7 @@ public class GraphiteBackendListenerClie
     private static final long ONE_SECOND = 1L;
     private static final int MAX_POOL_SIZE = 1;
     private static final String DEFAULT_PERCENTILES = "90;95;99";
+    private static final String SEPARATOR = ";"; //$NON-NLS-1$
 
     private String graphiteHost;
     private int graphitePort;
@@ -72,7 +73,7 @@ public class GraphiteBackendListenerClie
     private String rootMetricsPrefix;
     private String samplersList = ""; //$NON-NLS-1$
     private Set<String> samplersToFilter;
-    private HashMap<String, Float> percentiles;
+    private Map<String, Float> percentiles;
     
 
     private GraphiteMetricsSender pickleMetricsManager;
@@ -165,7 +166,7 @@ public class GraphiteBackendListenerClie
         samplersList = context.getParameter("samplersList", "");
         rootMetricsPrefix = context.getParameter("rootMetricsPrefix", DEFAULT_METRICS_PREFIX);
         String percentilesAsString = context.getParameter("percentiles", DEFAULT_METRICS_PREFIX);
-        String[]  percentilesStringArray = percentilesAsString.split(";");
+        String[]  percentilesStringArray = percentilesAsString.split(SEPARATOR);
         percentiles = new HashMap<String, Float>(percentilesStringArray.length);
         DecimalFormat format = new DecimalFormat("0.##");
         for (int i = 0; i < percentilesStringArray.length; i++) {
@@ -176,14 +177,14 @@ public class GraphiteBackendListenerClie
                             METRIC_PERCENTILE_PREFIX+AbstractGraphiteMetricsSender.sanitizeString(format.format(percentileValue)),
                             percentileValue);
                 } catch(Exception e) {
-                    LOGGER.error("Error parsing percentile:'"+percentilesStringArray[i]+"'");
+                    LOGGER.error("Error parsing percentile:'"+percentilesStringArray[i]+"'",
e);
                 }
             }
         }
         Class<?> clazz = Class.forName(graphiteMetricsSenderClass);
         this.pickleMetricsManager = (GraphiteMetricsSender) clazz.newInstance();
         pickleMetricsManager.setup(graphiteHost, graphitePort, rootMetricsPrefix);
-        String[] samplers = samplersList.split(",");
+        String[] samplers = samplersList.split(SEPARATOR);
         samplersToFilter = new HashSet<String>();
         for (String samplerName : samplers) {
             samplersToFilter.add(samplerName);

Modified: jmeter/trunk/xdocs/usermanual/component_reference.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=1643254&r1=1643253&r2=1643254&view=diff
==============================================================================
--- jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jmeter/trunk/xdocs/usermanual/component_reference.xml Fri Dec  5 12:19:44 2014
@@ -3412,7 +3412,7 @@ By default, a Graphite implementation is
         <property name="graphitePort" required="Yes">Graphite or InfluxDB or CollectD
server port, defaults to 2003. Note PickleGraphiteMetricsSender can only talk to Graphite
server.</property>
         <property name="rootMetricsPrefix" required="Yes">Prefix of metrics sent to
backend. Defaults to ""jmeter."</property>
         <property name="summaryOnly" required="Yes">Only send a summary with no detail.
Defaults to true.</property>
-        <property name="samplersList" required="Yes">Comma separated list of samplers
for which you want to report metrics to backend.</property>
+        <property name="samplersList" required="Yes">Semicolon separated list of samplers
for which you want to report metrics to backend.</property>
         <property name="percentiles" required="Yes">The percentiles you want to send
to backend. List must be semicolon separated.</property>
     </properties>
 </component>
@@ -6485,3 +6485,4 @@ If Test Plan is stopped, tearDown will n
  -->
 </body>
 </document>
+



Mime
View raw message