|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jmeter.testelement.AbstractTestElement org.apache.jmeter.samplers.AbstractSampler org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase org.apache.jmeter.protocol.http.sampler.HTTPSampler org.apache.jmeter.protocol.http.sampler.AccessLogSampler
public class AccessLogSampler
Description:
AccessLogSampler is responsible for a couple of things:
Some bugs only appear under production traffic, so it is useful to generate traffic using production logs. This way, JMeter can record when problems occur and provide a way to match the server logs.
Created on: Jun 26, 2003
Field Summary | |
---|---|
static String |
DEFAULT_CLASS
|
Fields inherited from interface org.apache.jmeter.protocol.http.util.HTTPConstantsInterface |
---|
APPLICATION_X_WWW_FORM_URLENCODED, CACHE_CONTROL, CONNECT, CONNECTION_CLOSE, DATE, DEFAULT_HTTP_PORT, DEFAULT_HTTP_PORT_STRING, DEFAULT_HTTPS_PORT, DEFAULT_HTTPS_PORT_STRING, DELETE, ENCODING_GZIP, ETAG, EXPIRES, GET, HEAD, HEADER_AUTHORIZATION, HEADER_CONNECTION, HEADER_CONTENT_DISPOSITION, HEADER_CONTENT_ENCODING, HEADER_CONTENT_LENGTH, HEADER_CONTENT_TYPE, HEADER_COOKIE, HEADER_HOST, HEADER_LOCATION, HEADER_SET_COOKIE, HTTP_1_1, IF_MODIFIED_SINCE, IF_NONE_MATCH, KEEP_ALIVE, LAST_MODIFIED, MULTIPART_FORM_DATA, OPTIONS, PATCH, POST, PROTOCOL_HTTP, PROTOCOL_HTTPS, PUT, TRACE, TRANSFER_ENCODING |
Fields inherited from interface org.apache.jmeter.testelement.TestElement |
---|
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS |
Constructor Summary | |
---|---|
AccessLogSampler()
|
Method Summary | |
---|---|
Object |
clone()
|
String |
getDomain()
|
String |
getFilterClassName()
|
String |
getLogFile()
Get the path where XML messages are stored. this is the directory where JMeter will randomly select a file. |
String |
getParserClassName()
Get the file location of the xml file. |
String |
getPortString()
|
protected void |
initFilter()
|
void |
instantiateParser()
Method will instantiate the log parser based on the class in the text field. |
boolean |
isImageParsing()
|
SampleResult |
sample(Entry e)
sample(Entry e) simply calls sample(). |
SampleResult |
sampleWithParser()
sample gets a new HTTPSampler from the generator and calls it's sample() method. |
void |
setDomain(String domain)
|
void |
setFilterClassName(String filterClassName)
|
void |
setImageParsing(boolean imageParsing)
|
void |
setLogFile(String path)
Set the path where XML messages are stored for random selection. |
void |
setParserClassName(String classname)
it's kinda obvious, but we state it anyways. |
void |
setPortString(String port)
|
void |
testEnded()
Called once for all threads after the end of a test. This will use the same element instances as at the start of the test. N.B. testStarted() and testEnded() are called from different threads. |
void |
testStarted()
Called just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point. N.B. testStarted() and testEnded() are called from different threads. |
void |
threadFinished()
Called for each thread after all samples have been processed. |
Methods inherited from class org.apache.jmeter.protocol.http.sampler.HTTPSampler |
---|
interrupt, sample |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.jmeter.testelement.ThreadListener |
---|
threadStarted |
Methods inherited from interface org.apache.jmeter.testelement.TestElement |
---|
canRemove, clear, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse |
Field Detail |
---|
public static final String DEFAULT_CLASS
Constructor Detail |
---|
public AccessLogSampler()
Method Detail |
---|
public void setLogFile(String path)
public String getLogFile()
public void setParserClassName(String classname)
classname
- -
parser class namepublic String getParserClassName()
public SampleResult sampleWithParser()
public SampleResult sample(Entry e)
sample
in interface Sampler
sample
in class HTTPSamplerBase
e
- -
ignored
public void instantiateParser()
public String getFilterClassName()
public void setFilterClassName(String filterClassName)
filterClassName
- The filterClassName to set.public String getDomain()
getDomain
in class HTTPSamplerBase
public void setDomain(String domain)
setDomain
in class HTTPSamplerBase
domain
- The domain to set.public boolean isImageParsing()
public void setImageParsing(boolean imageParsing)
imageParsing
- The imageParsing to set.public String getPortString()
public void setPortString(String port)
port
- The port to set.protected void initFilter()
public Object clone()
clone
in interface TestElement
clone
in class HTTPSamplerBase
public void testEnded()
Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.
N.B. testStarted() and testEnded() are called from different threads.
testEnded
in interface TestStateListener
testEnded
in class HTTPSamplerBase
StandardJMeterEngine.stopTest()
public void testStarted()
Called just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point.
N.B. testStarted() and testEnded() are called from different threads.
testStarted
in interface TestStateListener
testStarted
in class HTTPSamplerBase
StandardJMeterEngine.run()
public void threadFinished()
threadFinished
in interface ThreadListener
threadFinished
in class HTTPSamplerBase
JMeterThread.threadFinished(LoopIterationListener)
|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |