jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1198513 - in /jmeter/trunk/src/core/org/apache/jmeter: testelement/TestElement.java threads/SamplePackage.java threads/TestCompiler.java
Date Sun, 06 Nov 2011 17:48:34 GMT
Author: pmouawad
Date: Sun Nov  6 17:48:34 2011
New Revision: 1198513

URL: http://svn.apache.org/viewvc?rev=1198513&view=rev
Log:
Javadoc improvement from what I understood (If I am wrong don't hesitate to fix it)

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/testelement/TestElement.java
    jmeter/trunk/src/core/org/apache/jmeter/threads/SamplePackage.java
    jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/testelement/TestElement.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/testelement/TestElement.java?rev=1198513&r1=1198512&r2=1198513&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/testelement/TestElement.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/testelement/TestElement.java Sun Nov  6 17:48:34
2011
@@ -117,7 +117,7 @@ public interface TestElement extends Clo
 
     /**
      * Tells the test element to return to the state it was in when
-     * makeRunningVersion() was called.
+     * setRunningVersion(true) was called.
      */
     public void recoverRunningVersion();
 

Modified: jmeter/trunk/src/core/org/apache/jmeter/threads/SamplePackage.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/threads/SamplePackage.java?rev=1198513&r1=1198512&r2=1198513&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/threads/SamplePackage.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/threads/SamplePackage.java Sun Nov  6 17:48:34
2011
@@ -31,7 +31,17 @@ import org.apache.jmeter.testelement.Tes
 import org.apache.jmeter.timers.Timer;
 
 /**
- * Packages methods related to sample handling.
+ * Packages methods related to sample handling.<br/>
+ * A SamplePackage contains all elements associated to a Sampler:
+ * <ul>
+ * 	<li>SampleListener(s)</li>
+ * 	<li>Timer(s)</li>
+ * 	<li>Assertion(s)</li>
+ * 	<li>PreProcessor(s)</li>
+ * 	<li>PostProcessor(s)</li>
+ * 	<li>ConfigTestElement(s)</li>
+ * 	<li>Controller(s)</li>
+ * </ul>
  */
 public class SamplePackage {
 
@@ -68,6 +78,13 @@ public class SamplePackage {
         this.controllers = controllers;
     }
 
+    /**
+     * Make the SamplePackage the running version, or make it no longer the
+     * running version. This tells to each element of the SamplePackage that it's current
state must
+     * be retrievable by a call to recoverRunningVersion(). 
+     * @param running boolean
+     * @see TestElement#setRunningVersion(boolean)
+     */
     public void setRunningVersion(boolean running) {
         setRunningVersion(configs, running);
         setRunningVersion(sampleListeners, running);
@@ -95,6 +112,10 @@ public class SamplePackage {
         }
     }
 
+    /**
+     * Recover each member of SamplePackage to the state before the call of setRunningVersion(true)
+ 	 * @see TestElement#recoverRunningVersion()
+     */
     public void recoverRunningVersion() {
         recoverRunningVersion(configs);
         recoverRunningVersion(sampleListeners);
@@ -106,52 +127,92 @@ public class SamplePackage {
         sampler.recoverRunningVersion();
     }
 
+    /**
+     * @return List<SampleListener>
+     */
     public List<SampleListener> getSampleListeners() {
         return sampleListeners;
     }
 
+    /**
+     * Add Sample Listener
+     * @param listener {@link SampleListener}
+     */
     public void addSampleListener(SampleListener listener) {
         sampleListeners.add(listener);
     }
 
+    /**
+     * @return List<Timer>
+     */
     public List<Timer> getTimers() {
         return timers;
     }
 
+    
+    /**
+     * Add Post processor
+     * @param ex {@link PostProcessor}
+     */
     public void addPostProcessor(PostProcessor ex) {
         postProcessors.add(ex);
     }
 
+    /**
+     * Add Pre processor
+     * @param pre {@link PreProcessor}
+     */
     public void addPreProcessor(PreProcessor pre) {
         preProcessors.add(pre);
     }
 
+    /**
+     * Add Timer
+     * @param timer {@link Timer}
+     */
     public void addTimer(Timer timer) {
         timers.add(timer);
     }
 
+    /**
+     * Add Assertion
+     * @param asser {@link Assertion}
+     */
     public void addAssertion(Assertion asser) {
         assertions.add(asser);
     }
 
+    /**
+     * @return List<Assertion>
+     */
     public List<Assertion> getAssertions() {
         return assertions;
     }
 
+    /**
+     * @return List<PostProcessor>
+     */
     public List<PostProcessor> getPostProcessors() {
         return postProcessors;
     }
 
+    /**
+     * @return {@link Sampler}
+     */
     public Sampler getSampler() {
         return sampler;
     }
 
+    /**
+     * @param s {@link Sampler}
+     */
     public void setSampler(Sampler s) {
         sampler = s;
     }
 
     /**
      * Returns the preProcessors.
+     * @return List<PreProcessor>
      */
     public List<PreProcessor> getPreProcessors() {
         return preProcessors;

Modified: jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java?rev=1198513&r1=1198512&r2=1198513&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java Sun Nov  6 17:48:34
2011
@@ -44,6 +44,13 @@ import org.apache.jorphan.collections.Ha
 import org.apache.jorphan.logging.LoggingManager;
 import org.apache.log.Logger;
 
+/**
+ * HashTreeTraverser implementation that traverses the Test Tree to build:
+ * <ul>
+ * 	<li>A map with key Sampler and as value the associated SamplePackage</li>
+ * 	<li>A map with key TransactionController and as value the associated SamplePackage</li>
+ * </ul>
+ */
 public class TestCompiler implements HashTreeTraverser {
     private static final Logger log = LoggingManager.getLoggerForClass();
 
@@ -79,6 +86,11 @@ public class TestCompiler implements Has
         }
     }
 
+    /**
+     * Configures sampler from SamplePackage extracted from Test plan and returns it
+     * @param sampler {@link Sampler}
+     * @return {@link SamplePackage}
+     */
     public SamplePackage configureSampler(Sampler sampler) {
         SamplePackage pack = samplerConfigMap.get(sampler);
         pack.setSampler(sampler);
@@ -86,6 +98,11 @@ public class TestCompiler implements Has
         return pack;
     }
 
+    /**
+     * Configures Transaction Sampler from SamplePackage extracted from Test plan and returns
it
+     * @param transactionSampler {@link TransactionSampler}
+     * @return {@link SamplePackage}
+     */
     public SamplePackage configureTransactionSampler(TransactionSampler transactionSampler)
{
         TransactionController controller = transactionSampler.getTransactionController();
         SamplePackage pack = transactionControllerConfigMap.get(controller);
@@ -93,6 +110,10 @@ public class TestCompiler implements Has
         return pack;
     }
 
+    /**
+     * Reset pack to it's initial state
+     * @param pack
+     */
     public void done(SamplePackage pack) {
         pack.recoverRunningVersion();
     }



Mime
View raw message