You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by fs...@apache.org on 2014/11/29 17:19:51 UTC
svn commit: r1642447 - in /jmeter/trunk/src/core/org/apache/jmeter:
reporters/FileReporter.java reporters/ResultCollector.java
samplers/Entry.java samplers/RemoteSampleListener.java save/SaveService.java
Author: fschumacher
Date: Sat Nov 29 16:19:51 2014
New Revision: 1642447
URL: http://svn.apache.org/r1642447
Log:
Bug 57193: Add param and return tags to javadoc
Bugzilla Id: 57193
Modified:
jmeter/trunk/src/core/org/apache/jmeter/reporters/FileReporter.java
jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java
jmeter/trunk/src/core/org/apache/jmeter/samplers/Entry.java
jmeter/trunk/src/core/org/apache/jmeter/samplers/RemoteSampleListener.java
jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java
Modified: jmeter/trunk/src/core/org/apache/jmeter/reporters/FileReporter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/reporters/FileReporter.java?rev=1642447&r1=1642446&r2=1642447&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/reporters/FileReporter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/reporters/FileReporter.java Sat Nov 29 16:19:51 2014
@@ -57,7 +57,14 @@ public class FileReporter extends JPanel
private final Map<String, List<Integer>> data = new ConcurrentHashMap<String, List<Integer>>();
- /** initalize a file reporter from a file */
+ /**
+ * Initialize a file reporter from a file
+ *
+ * @param file
+ * The name of the file to read from
+ * @throws IOException
+ * when the corresponding file can not be opened or be read from
+ */
public void init(String file) throws IOException {
File datafile = new File(file);
BufferedReader reader = null;
@@ -107,6 +114,13 @@ public class FileReporter extends JPanel
showPanel();
}
+ /**
+ * Get the data currently assigned to a given key
+ *
+ * @param key
+ * The key for which the data should be given
+ * @return list of data for the given key
+ */
public List<Integer> getData(String key) {
return data.get(key);
}
@@ -159,6 +173,9 @@ private static class GraphPanel extends
/**
* Get the maximum for all the data.
+ *
+ * @return the maximum of all data for all keys, or <code>0</code> if no
+ * data is present
*/
public float getMax() {
float maxValue = 0;
@@ -178,6 +195,8 @@ private static class GraphPanel extends
/**
* Get the minimum for all the data.
+ * @return the maximum of all data for all keys, or <code>9999999</code> if no
+ * data is present
*/
public float getMin() {
float minValue = 9999999;
@@ -197,6 +216,8 @@ private static class GraphPanel extends
/**
* Get the legend panel.
+ *
+ * @return the newly created legend panel
*/
public JPanel getLegend() {
JPanel main = new JPanel();
@@ -231,6 +252,8 @@ private static class GraphPanel extends
/**
* Get the stats panel.
+ *
+ * @return a newly created stats panel
*/
public JPanel getStats() {
int total = 0;
@@ -292,6 +315,8 @@ private static class GraphPanel extends
/**
* Gets the size of the biggest List.
+ *
+ * @return the max size of all lists for all key
*/
public int getDataWidth() {
int size = 0;
Modified: jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java?rev=1642447&r1=1642446&r2=1642447&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java Sat Nov 29 16:19:51 2014
@@ -166,6 +166,10 @@ public class ResultCollector extends Abs
this(null);
}
+ /**
+ * Constructor which sets the used {@link Summariser}
+ * @param summer The {@link Summariser} to use
+ */
public ResultCollector(Summariser summer) {
setErrorLogging(false);
setSuccessOnlyLogging(false);
@@ -188,18 +192,40 @@ public class ResultCollector extends Abs
setProperty(FILENAME, f);
}
+ /**
+ * Get the filename of the file this collector uses
+ *
+ * @return The name of the file
+ */
public String getFilename() {
return getPropertyAsString(FILENAME);
}
+ /**
+ * Get the state of error logging
+ *
+ * @return Flag whether errors should be logged
+ */
public boolean isErrorLogging() {
return getPropertyAsBoolean(ERROR_LOGGING);
}
+ /**
+ * Sets error logging flag
+ *
+ * @param errorLogging
+ * The flag whether errors should be logged
+ */
public final void setErrorLogging(boolean errorLogging) {
setProperty(new BooleanProperty(ERROR_LOGGING, errorLogging));
}
+ /**
+ * Sets the flag whether only successful samples should be logged
+ *
+ * @param value
+ * The flag whether only successful samples should be logged
+ */
public final void setSuccessOnlyLogging(boolean value) {
if (value) {
setProperty(new BooleanProperty(SUCCESS_ONLY_LOGGING, true));
@@ -208,6 +234,11 @@ public class ResultCollector extends Abs
}
}
+ /**
+ * Get the state of successful only logging
+ *
+ * @return Flag whether only successful samples should be logged
+ */
public boolean isSuccessOnlyLogging() {
return getPropertyAsBoolean(SUCCESS_ONLY_LOGGING,false);
}
@@ -323,9 +354,11 @@ public class ResultCollector extends Abs
/**
* Loads an existing sample data (JTL) file.
* This can be one of:
- * - XStream format
- * - Avalon format
- * - CSV format
+ * <ul>
+ * <li>XStream format</li>
+ * <li>Avalon format</li>
+ * <li>CSV format</li>
+ * </ul>
*
*/
public void loadExistingFile() {
@@ -566,8 +599,8 @@ public class ResultCollector extends Abs
/**
* recordStats is used to save statistics generated by visualizers
*
- * @param e
- * @throws IOException
+ * @param e The data to save
+ * @throws IOException when data writing fails
*/
// Used by: MonitorHealthVisualizer.add(SampleResult res)
public void recordStats(TestElement e) throws IOException {
Modified: jmeter/trunk/src/core/org/apache/jmeter/samplers/Entry.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/samplers/Entry.java?rev=1642447&r1=1642446&r2=1642447&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/samplers/Entry.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/samplers/Entry.java Sat Nov 29 16:19:51 2014
@@ -69,6 +69,12 @@ public class Entry {
/**
* Add a config element as a specific class. Usually this is done to add a
* subclass as one of it's parent classes.
+ *
+ * @param config
+ * the {@link ConfigElement} to be added
+ * @param asClass
+ * the {@link Class} under which the {@link ConfigElement} should
+ * be registered
*/
public void addConfigElement(ConfigElement config, Class<?> asClass) {
if (config != null) {
Modified: jmeter/trunk/src/core/org/apache/jmeter/samplers/RemoteSampleListener.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/samplers/RemoteSampleListener.java?rev=1642447&r1=1642446&r2=1642447&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/samplers/RemoteSampleListener.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/samplers/RemoteSampleListener.java Sat Nov 29 16:19:51 2014
@@ -22,7 +22,7 @@ import java.rmi.RemoteException;
import java.util.List;
/**
- * Allows notification on events occuring during the sampling process.
+ * Allows notification on events occurring during the sampling process.
* Specifically, when sampling is started, when a specific sample is obtained,
* and when sampling is stopped.
*
@@ -44,7 +44,7 @@ public interface RemoteSampleListener ex
/**
* This method is called remotely and fires a list of samples events
- * recieved locally. The function is to reduce network load when using
+ * received locally. The function is to reduce network load when using
* remote testing.
*
* @param samples
@@ -55,16 +55,28 @@ public interface RemoteSampleListener ex
/**
* A sample has started and stopped.
+ *
+ * @param e
+ * the event with data about the completed sample
+ * @throws RemoteException
*/
void sampleOccurred(SampleEvent e) throws RemoteException;
/**
* A sample has started.
+ *
+ * @param e
+ * the event with data about the started sample
+ * @throws RemoteException
*/
void sampleStarted(SampleEvent e) throws RemoteException;
/**
* A sample has stopped.
+ *
+ * @param e
+ * the event with data about the stopped sample
+ * @throws RemoteException
*/
void sampleStopped(SampleEvent e) throws RemoteException;
}
Modified: jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java?rev=1642447&r1=1642446&r2=1642447&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java Sat Nov 29 16:19:51 2014
@@ -351,6 +351,7 @@ public class SaveService {
*
* @param evt sampleResult wrapped in a sampleEvent
* @param writer output stream which must be created using {@link #getFileEncoding(String)}
+ * @throws IOException when writing data to output fails
*/
// Used by ResultCollector.sampleOccurred(SampleEvent event)
public synchronized static void saveSampleResult(SampleEvent evt, Writer writer) throws IOException {
@@ -382,6 +383,7 @@ public class SaveService {
/**
* @param elem test element
* @param writer output stream which must be created using {@link #getFileEncoding(String)}
+ * @throws IOException when writing data to output fails
*/
// Used by ResultCollector#recordStats()
public synchronized static void saveTestElement(TestElement elem, Writer writer) throws IOException {
@@ -489,7 +491,7 @@ public class SaveService {
*
* @param reader of the file
* @param resultCollectorHelper helper class to enable TestResultWrapperConverter to deliver the samples
- * @throws IOException
+ * @throws IOException if an I/O error occurs
*/
public static void loadTestResults(InputStream reader, ResultCollectorHelper resultCollectorHelper) throws IOException {
// Get the InputReader to use