jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1645736 - /jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java
Date Mon, 15 Dec 2014 19:56:36 GMT
Author: pmouawad
Date: Mon Dec 15 19:56:36 2014
New Revision: 1645736

URL: http://svn.apache.org/r1645736
Log:
Change case of  static fields

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java?rev=1645736&r1=1645735&r2=1645736&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java Mon Dec 15 19:56:36
2014
@@ -88,18 +88,18 @@ public class Summariser extends Abstract
     private static final int INTERVAL_WINDOW = 5; // in seconds
 
     /**
-     * Lock used to protect accumulators update + instanceCount update
+     * Lock used to protect ACCUMULATORS update + INSTANCE_COUNT update
      */
-    private static final Object lock = new Object();
+    private static final Object LOCK = new Object();
 
     /*
      * This map allows summarisers with the same name to contribute to the same totals.
      */
-    //@GuardedBy("accumulators") - needed to ensure consistency between this and instanceCount
-    private static final Map<String, Totals> accumulators = new ConcurrentHashMap<String,
Totals>();
+    //@GuardedBy("LOCK") - needed to ensure consistency between this and INSTANCE_COUNT
+    private static final Map<String, Totals> ACCUMULATORS = new ConcurrentHashMap<String,
Totals>();
 
-    //@GuardedBy("accumulators")
-    private static int instanceCount; // number of active tests
+    //@GuardedBy("LOCK")
+    private static int INSTANCE_COUNT; // number of active tests
 
     /*
      * Cached copy of Totals for this instance.
@@ -122,9 +122,9 @@ public class Summariser extends Abstract
      */
     public Summariser() {
         super();
-        synchronized (lock) {
-            accumulators.clear();
-            instanceCount=0;
+        synchronized (LOCK) {
+            ACCUMULATORS.clear();
+            INSTANCE_COUNT=0;
         }
     }
 
@@ -336,14 +336,14 @@ public class Summariser extends Abstract
      */
     @Override
     public void testStarted(String host) {
-        synchronized (lock) {
+        synchronized (LOCK) {
             myName = getName();
-            myTotals = accumulators.get(myName);
+            myTotals = ACCUMULATORS.get(myName);
             if (myTotals == null){
                 myTotals = new Totals();
-                accumulators.put(myName, myTotals);
+                ACCUMULATORS.put(myName, myTotals);
             }
-            instanceCount++;
+            INSTANCE_COUNT++;
         }
     }
 
@@ -356,10 +356,10 @@ public class Summariser extends Abstract
     @Override
     public void testEnded(String host) {
         Set<Entry<String, Totals>> totals = null;
-        synchronized (lock) {
-            instanceCount--;
-            if (instanceCount <= 0){
-                totals = accumulators.entrySet();
+        synchronized (LOCK) {
+            INSTANCE_COUNT--;
+            if (INSTANCE_COUNT <= 0){
+                totals = ACCUMULATORS.entrySet();
             }
         }
         if (totals == null) {// We're not done yet



Mime
View raw message