|
Apache JMeter 2.0.1.20050615 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jmeter.samplers.SampleResult
This is a nice packaging for the various information returned from taking a sample of an entry.
Nested Class Summary | |
static class |
SampleResult.Test
|
Field Summary | |
static String |
BINARY
Data type value indicating that the response data is binary. |
static String |
TEXT
Data type value indicating that the response data is text. |
Constructor Summary | |
|
SampleResult()
|
protected |
SampleResult(long elapsed,
boolean atend)
Create a sample with a specific elapsed time but don't allow the times to be changed later (only used by HTTPSampleResult) |
|
SampleResult(long stamp,
long elapsed)
Allow users to create a sample with specific timestamp and elapsed times for cloning purposes, but don't allow the times to be changed later Currently used by SaveService only |
|
SampleResult(SampleResult res)
Construct a 'parent' result for an already-existing result, essentially cloning it |
Method Summary | |
void |
addAssertionResult(AssertionResult assertResult)
|
void |
addSubResult(SampleResult subResult)
|
void |
configure(org.apache.avalon.framework.configuration.Configuration info)
|
static SampleResult |
createTestSample(long elapsed)
Create a sample with a specific elapsed time for test purposes, but don't allow the times to be changed later |
static SampleResult |
createTestSample(long start,
long end)
Create a sample with specific start and end times for test purposes, but don't allow the times to be changed later (used by StatVisualizerModel.Test) |
AssertionResult[] |
getAssertionResults()
Gets the assertion results associated with this sample. |
String |
getContentType()
|
String |
getDataEncoding()
Returns the dataEncoding. |
String |
getDataType()
|
long |
getEndTime()
|
String |
getRequestHeaders()
|
String |
getResponseCode()
|
byte[] |
getResponseData()
Gets the responseData attribute of the SampleResult object. |
String |
getResponseHeaders()
|
String |
getResponseMessage()
|
String |
getSampleLabel()
|
String |
getSamplerData()
|
long |
getStartTime()
|
SampleResult[] |
getSubResults()
Gets the subresults associated with this sample. |
String |
getThreadName()
|
long |
getTime()
Get the time it took this sample to occur. |
long |
getTimeStamp()
|
URL |
getURL()
|
boolean |
isMarked(String filename)
|
boolean |
isMonitor()
If the sampler is a monitor, method will return true. |
boolean |
isStopTest()
|
boolean |
isStopThread()
|
boolean |
isSuccessful()
|
byte[] |
responseDataAsBA()
Convenience method to get responseData as a non-null byte array |
void |
sampleEnd()
Record the end time of a sample and calculate the elapsed time |
void |
samplePause()
Pause a sample |
void |
sampleResume()
Resume a sample |
void |
sampleStart()
Record the start time of a sample |
void |
setContentType(String string)
|
void |
setDataEncoding(String dataEncoding)
Sets the dataEncoding. |
void |
setDataType(String dataType)
|
void |
setMarked(String filename)
|
void |
setMonitor(boolean monitor)
When a Sampler is working as a monitor |
void |
setRequestHeaders(String string)
|
void |
setResponseCode(String code)
|
void |
setResponseData(byte[] response)
Sets the responseData attribute of the SampleResult object. |
void |
setResponseHeaders(String string)
|
void |
setResponseMessage(String msg)
|
void |
setSampleLabel(String label)
|
void |
setSamplerData(String s)
|
protected void |
setStartTime(long start)
|
void |
setStopTest(boolean b)
|
void |
setStopThread(boolean b)
|
void |
setSuccessful(boolean success)
Sets the successful attribute of the SampleResult object. |
void |
setThreadName(String threadName)
|
void |
setTime(long elapsed)
Deprecated. use sampleStart() and sampleEnd() instead |
void |
setURL(URL location)
|
String |
toString()
Returns the display name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String TEXT
getDataType()
,
setDataType(java.lang.String)
,
Constant Field Valuespublic static final String BINARY
getDataType()
,
setDataType(java.lang.String)
,
Constant Field ValuesConstructor Detail |
public SampleResult()
public SampleResult(SampleResult res)
res
- existing sample resultprotected SampleResult(long elapsed, boolean atend)
elapsed
- timeatend
- create the sample finishing now, else starting nowpublic SampleResult(long stamp, long elapsed)
stamp
- - this may be a start time or an end timeelapsed
- Method Detail |
public static SampleResult createTestSample(long start, long end)
start
- start timeend
- end timepublic static SampleResult createTestSample(long elapsed)
elapsed
- - desired elapsed timepublic void setTime(long elapsed)
elapsed
- time in millisecondspublic void setMarked(String filename)
public boolean isMarked(String filename)
public String getResponseCode()
public void setResponseCode(String code)
public String getResponseMessage()
public void setResponseMessage(String msg)
public String getThreadName()
public void setThreadName(String threadName)
public long getTimeStamp()
public String getSampleLabel()
public void setSampleLabel(String label)
public void addAssertionResult(AssertionResult assertResult)
public AssertionResult[] getAssertionResults()
public void addSubResult(SampleResult subResult)
public SampleResult[] getSubResults()
public void configure(org.apache.avalon.framework.configuration.Configuration info)
public void setResponseData(byte[] response)
response
- the new responseData valuepublic byte[] getResponseData()
public byte[] responseDataAsBA()
public void setSamplerData(String s)
public String getSamplerData()
public long getTime()
public boolean isSuccessful()
public void setDataType(String dataType)
public String getDataType()
public void setSuccessful(boolean success)
success
- the new successful valuepublic String toString()
public String getDataEncoding()
public void setDataEncoding(String dataEncoding)
dataEncoding
- the dataEncoding to set, e.g. ISO-8895-1, UTF-8public boolean isStopTest()
public boolean isStopThread()
public void setStopTest(boolean b)
b
- public void setStopThread(boolean b)
b
- public String getRequestHeaders()
public String getResponseHeaders()
public void setRequestHeaders(String string)
string
- - request headerspublic void setResponseHeaders(String string)
string
- - response headerspublic String getContentType()
public void setContentType(String string)
string
- public long getEndTime()
public long getStartTime()
protected final void setStartTime(long start)
public void sampleStart()
public void sampleEnd()
public void samplePause()
public void sampleResume()
public void setMonitor(boolean monitor)
monitor
- public boolean isMonitor()
public void setURL(URL location)
public URL getURL()
|
Apache JMeter 2.0.1.20050615 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |