neth 01/08/15 03:54:05
Modified: src/org/apache/jmeter/samplers SampleResult.java
Log:
Added display name and toString() which returns the display name
Revision Changes Path
1.9 +28 -7 jakarta-jmeter/src/org/apache/jmeter/samplers/SampleResult.java
Index: SampleResult.java
===================================================================
RCS file: /home/cvs/jakarta-jmeter/src/org/apache/jmeter/samplers/SampleResult.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- SampleResult.java 2001/08/09 18:48:51 1.8
+++ SampleResult.java 2001/08/15 10:54:05 1.9
@@ -5,20 +5,22 @@
* companies.
*
* All rights reserved
- * $Header:
/home/cvs/jakarta-jmeter/src/org/apache/jmeter/samplers/SampleResult.java,v 1.8
2001/08/09 18:48:51 mstover1 Exp $
+ * $Header:
/home/cvs/jakarta-jmeter/src/org/apache/jmeter/samplers/SampleResult.java,v 1.9
2001/08/15 10:54:05 neth Exp $
*/
package org.apache.jmeter.samplers;
import java.util.*;
import java.io.Serializable;
+
+import org.apache.log4j.*;
/************************************************************
* This is a nice packaging for the various information returned from taking a
* sample of an entry.
*
- *@author $Author: mstover1 $
- *@created $Date: 2001/08/09 18:48:51 $
- *@version $Revision: 1.8 $
+ *@author $Author: neth $
+ *@created $Date: 2001/08/15 10:54:05 $
+ *@version $Revision: 1.9 $
***********************************************************/
public class SampleResult implements Serializable
{
@@ -31,6 +33,10 @@
public final static String TEXT_RESPONSE = "sampler.RESPONSE";
public final static String SAMPLE_LABEL = "sampler.LABEL";
public final static String SUCCESS = "sampler.SUCCESS";
+
+ private Category catClass =
+ Category.getInstance(SampleResult.class.getName());
+
/************************************************************
* !ToDo (Constructor description)
@@ -38,7 +44,8 @@
public SampleResult()
{
map = new HashMap();
- time = 0;
+ time = 0;
+ putValue(DISPLAY_NAME, "Display name of SampleResult not set");
}
/************************************************************
@@ -87,7 +94,11 @@
***********************************************************/
public Object getValue(String key)
{
- Object value = map.get(key);
+ Object value = map.get(key);
+ if(catClass.isDebugEnabled())
+ {
+ catClass.debug("getValue1 : key - " + key + " ; value - " +
value);
+ }
return value;
}
@@ -195,5 +206,15 @@
}
return value.toString();
}
-
+
+ /**
+ * Returns the display name
+ *
+ * @return display name of this sample result
+ */
+ public String toString()
+ {
+ String toString = (String)getValue(DISPLAY_NAME);
+ return toString;
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]