jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1649792 - in /jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend: AbstractBackendListenerClient.java BackendListenerClient.java
Date Tue, 06 Jan 2015 12:26:27 GMT
Author: pmouawad
Date: Tue Jan  6 12:26:27 2015
New Revision: 1649792

URL: http://svn.apache.org/r1649792
Log:
Bug 57193: Add param and return tags to javadoc
Fix javadocs
Bugzilla Id: 57193

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/AbstractBackendListenerClient.java
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/BackendListenerClient.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/AbstractBackendListenerClient.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/AbstractBackendListenerClient.java?rev=1649792&r1=1649791&r2=1649792&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/AbstractBackendListenerClient.java
(original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/AbstractBackendListenerClient.java
Tue Jan  6 12:26:27 2015
@@ -43,7 +43,8 @@ import org.apache.log.Logger;
  * supported for cases where extending this class is not possible (for example,
  * when the client class is already a subclass of some other class).
  * <p>
- * The handleSampleResult() method of BackendListenerClient does not have a default
+ * The {@link BackendListenerClient#handleSampleResults(java.util.List, BackendListenerContext)}
+ * method of BackendListenerClient does not have a default
  * implementation here, so subclasses must define at least this method. It may
  * be useful to override other methods as well.
  *
@@ -86,7 +87,7 @@ public abstract class AbstractBackendLis
         return LOGGER;
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.jmeter.visualizers.backend.BackendListenerClient#createSampleResult(org.apache.jmeter.samplers.SampleResult)
      */
     @Override
@@ -99,7 +100,7 @@ public abstract class AbstractBackendLis
      * @param sampleLabel Name of sample used as key
      * @return {@link SamplerMetric}
      */
-    protected SamplerMetric getSamplerMetric(String sampleLabel) {
+    protected final SamplerMetric getSamplerMetric(String sampleLabel) {
         SamplerMetric samplerMetric = metricsPerSampler.get(sampleLabel);
         if(samplerMetric == null) {
             samplerMetric = new SamplerMetric();
@@ -119,7 +120,7 @@ public abstract class AbstractBackendLis
     }
 
     /**
-     * @return UserMetric
+     * @return {@link UserMetric}
      */
     protected UserMetric getUserMetrics() {
         return userMetrics;

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/BackendListenerClient.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/BackendListenerClient.java?rev=1649792&r1=1649791&r2=1649792&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/BackendListenerClient.java
(original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/BackendListenerClient.java
Tue Jan  6 12:26:27 2015
@@ -70,24 +70,19 @@ public interface BackendListenerClient {
      * @param context
      *            the context to run with. This provides access to
      *            initialization parameters.
+     *            Context is readonly
      * @throws Exception when setup fails
      */
     void setupTest(BackendListenerContext context) throws Exception;
 
     /**
-     * Perform a single sample for each iteration. This method returns a
-     * {@link SampleResult} object. <code>SampleResult</code> has many
-     * fields which can be used. At a minimum, the test should use
-     * <code>SampleResult.sampleStart</code> and
-     * <code>SampleResult.sampleEnd</code>to set the time that the test
-     * required to execute. It is also a good idea to set the sampleLabel and
-     * the successful flag.
-     *
-     * @see org.apache.jmeter.samplers.SampleResult#sampleStart()
-     * @see org.apache.jmeter.samplers.SampleResult#sampleEnd()
-     * @see org.apache.jmeter.samplers.SampleResult#setSuccessful(boolean)
-     * @see org.apache.jmeter.samplers.SampleResult#setSampleLabel(String)
-     *
+     * Handle sampleResults, this can be done in many ways:
+     * <ul>
+     * <li>Write to a file</li>
+     * <li>Write to a distant server</li>
+     * <li>...</li>
+     * </ul>
+     * @param sampleResults List of {@link SampleResult}
      * @param context
      *            the context to run with. This provides access to
      *            initialization parameters.
@@ -96,7 +91,7 @@ public interface BackendListenerClient {
     void handleSampleResults(List<SampleResult> sampleResults, BackendListenerContext
context);
 
     /**
-     * Do any clean-up required by this test at the end of a test run.
+     * Do any clean-up required at the end of a test run.
      *
      * @param context
      *            the context to run with. This provides access to
@@ -120,10 +115,12 @@ public interface BackendListenerClient {
     Arguments getDefaultParameters();
 
     /**
-     * 
-     * @param context
-     * @param result
-     * @return
+     * Create a copy of SampleResult, this method is here to allow customizing 
+     * what is kept in the copy, for example copy could remove some useless fields.
+     * Default to cloning
+     * @param context {@link BackendListenerContext}
+     * @param result {@link SampleResult}
+     * @return {@link SampleResult}
      */
     SampleResult createSampleResult(
             BackendListenerContext context, SampleResult result);



Mime
View raw message