jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mchassagn...@apache.org
Subject svn commit: r1798176 - in /jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend: ErrorMetric.java SamplerMetric.java
Date Fri, 09 Jun 2017 08:29:42 GMT
Author: mchassagneux
Date: Fri Jun  9 08:29:42 2017
New Revision: 1798176

URL: http://svn.apache.org/viewvc?rev=1798176&view=rev
Log:
Fix some remarks
Bugzilla Id: 61167

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/ErrorMetric.java
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/SamplerMetric.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/ErrorMetric.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/ErrorMetric.java?rev=1798176&r1=1798175&r2=1798176&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/ErrorMetric.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/ErrorMetric.java Fri
Jun  9 08:29:42 2017
@@ -26,9 +26,16 @@ import org.apache.jmeter.samplers.Sample
  */
 public class ErrorMetric {
 
-    private String responseCode = "";
-    private String responseMessage = "";
-
+    /**
+     * Error code of a sample result, by example : "400"
+     */
+    private String responseCode = ""; // Never return null
+    
+    /**
+     * Error response message of a sample result, , by example : "bad request"
+     */
+    private String responseMessage = ""; // Never return null
+ 
     public ErrorMetric() {
     }
 
@@ -38,7 +45,7 @@ public class ErrorMetric {
     }
 
     /**
-     * @return the response code , '0' if he code is empty
+     * @return the response code , '0' if the code is empty
      */
     public String getResponseCode() {
         if (responseCode.isEmpty()) {

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/SamplerMetric.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/SamplerMetric.java?rev=1798176&r1=1798175&r2=1798176&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/SamplerMetric.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/SamplerMetric.java Fri
Jun  9 08:29:42 2017
@@ -23,6 +23,7 @@ import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
 import org.apache.jmeter.control.TransactionController;
@@ -62,7 +63,7 @@ public class SamplerMetric {
     private int successes;
     private int failures;
     private int hits;
-    private HashMap<ErrorMetric, Integer> errors = new HashMap<ErrorMetric, Integer>();
+    private Map<ErrorMetric, Integer> errors = new HashMap<>();
 
     
     /**
@@ -313,7 +314,7 @@ public class SamplerMetric {
      * Returns details of errors occurs
      * @return errors
      */
-    public HashMap<ErrorMetric, Integer> getErrors() {
+    public Map<ErrorMetric, Integer> getErrors() {
         return errors;
     }
 }



Mime
View raw message