jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1778950 - in /jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend: SamplerMetric.java WindowMode.java
Date Sun, 15 Jan 2017 22:03:37 GMT
Author: pmouawad
Date: Sun Jan 15 22:03:37 2017
New Revision: 1778950

URL: http://svn.apache.org/viewvc?rev=1778950&view=rev
Log:
Bug 60591 - BackendListener : Add a time boxed sampling 
tab police
Bugzilla Id: 60591

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

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=1778950&r1=1778949&r2=1778950&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 Sun
Jan 15 22:03:37 2017
@@ -65,14 +65,13 @@ public class SamplerMetric {
      * 
      */
     public SamplerMetric() {
-    	List<DescriptiveStatistics> stats = new ArrayList<>(4);
-    	stats.add(pctResponseStats);
-    	stats.addAll(windowedStats);
-
-    	// Limit to sliding window of SLIDING_WINDOW_SIZE values
-		for (DescriptiveStatistics stat : stats) {
-    		stat.setWindowSize(SLIDING_WINDOW_SIZE);
-    	}
+        List<DescriptiveStatistics> stats = new ArrayList<>(4);
+        stats.add(pctResponseStats);
+        stats.addAll(windowedStats);
+        // Limit to sliding window of SLIDING_WINDOW_SIZE values
+        for (DescriptiveStatistics stat : stats) {
+            stat.setWindowSize(SLIDING_WINDOW_SIZE);
+        }
     }
 
     /**
@@ -127,19 +126,19 @@ public class SamplerMetric {
      * Reset metric except for percentile related data
      */
     public synchronized void resetForTimeInterval() {
-    	switch (WINDOW_MODE) {
-    		case FIXED:
-                // We don't clear responsesStats nor usersStats as it will slide as per my
understanding of 
-                // http://commons.apache.org/proper/commons-math/userguide/stat.html
-    			break;
-    		case TIMED:
-    			for (DescriptiveStatistics stat : windowedStats) {
-    				stat.clear();
-    			}
-    			break;
-			default: 
-			    // This cannot happen
-    	}
+        switch (WINDOW_MODE) {
+        case FIXED:
+            // We don't clear responsesStats nor usersStats as it will slide as per my understanding
of 
+            // http://commons.apache.org/proper/commons-math/userguide/stat.html
+            break;
+        case TIMED:
+            for (DescriptiveStatistics stat : windowedStats) {
+                stat.clear();
+            }
+            break;
+        default: 
+            // This cannot happen
+        }
         successes = 0;
         failures = 0;
         hits = 0;

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/WindowMode.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/WindowMode.java?rev=1778950&r1=1778949&r2=1778950&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/WindowMode.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/WindowMode.java Sun
Jan 15 22:03:37 2017
@@ -25,16 +25,16 @@ import org.apache.jmeter.util.JMeterUtil
  * @since 3.2
  */
 public enum WindowMode {
-	/** Fixed-size sliding window. **/
-	FIXED,
-	/** Time boxed. **/
-	TIMED;
+    /** Fixed-size sliding window. **/
+    FIXED,
+    /** Time boxed. **/
+    TIMED;
 
-	/**
-	 * Gets defined JMeter mode.
-	 */
-	public static WindowMode get() {
-		String name = JMeterUtils.getPropDefault("backend_metrics_window_mode", FIXED.name());
-		return WindowMode.valueOf(name.toUpperCase());
-	}
+    /**
+     * Gets defined JMeter mode.
+     */
+    public static WindowMode get() {
+        String name = JMeterUtils.getPropDefault("backend_metrics_window_mode", FIXED.name());
+        return WindowMode.valueOf(name.toUpperCase());
+    }
 }



Mime
View raw message