| org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase org.apache.jmeter.protocol.http.sampler.HTTPSampler org.apache.jmeter.protocol.http.sampler.AccessLogSampler
AccessLogSampler | public class AccessLogSampler extends HTTPSampler implements TestBean,ThreadListener(Code) | | Description:
AccessLogSampler is responsible for a couple of things:
- creating instances of Generator
- creating instances of Parser
- triggering popup windows
- calling Generator.generateRequest()
- checking to make sure the classes are valid
- making sure a class can be instantiated
The intent of this sampler is it uses the generator and parser to create a
HTTPSampler when it is needed. It does not contain logic about how to parse
the logs. It also doesn't care how Generator is implemented, as long as it
implements the interface. This means a person could simply implement a dummy
parser to generate random parameters and the generator consumes the results.
This wasn't the original intent of the sampler. I originaly wanted to write
this sampler, so that I can take production logs to simulate production
traffic in a test environment. Doing so is desirable to study odd or unusual
behavior. It's also good to compare a new system against an existing system
to get near apples- to-apples comparison. I've been asked if benchmarks are
really fair comparisons just about every single time, so this helps me
accomplish that task.
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
author: Peter Lin |
AccessLogSampler | public AccessLogSampler()(Code) | | |
getDomain | public String getDomain()(Code) | | Returns the domain. |
getFilterClassName | public String getFilterClassName()(Code) | | Returns the filterClassName. |
getLogFile | public String getLogFile()(Code) | | Get the path where XML messages are stored. this is the directory where
JMeter will randomly select a file.
|
getParserClassName | public String getParserClassName()(Code) | | Get the file location of the xml file.
String file path. |
getPortString | public String getPortString()(Code) | | Returns the port. |
initFilter | protected void initFilter()(Code) | | |
instantiateParser | public void instantiateParser()(Code) | | Method will instantiate the log parser based on the class in the text
field. This was done to make it easier for people to plugin their own log
parser and use different log parser.
|
isImageParsing | public boolean isImageParsing()(Code) | | Returns the imageParsing. |
sample | public SampleResult sample(Entry e)(Code) | | sample(Entry e) simply calls sample().
Parameters: e - -ignored the new sample |
sampleWithParser | public SampleResult sampleWithParser()(Code) | | sample gets a new HTTPSampler from the generator and calls it's sample()
method.
|
setDomain | public void setDomain(String domain)(Code) | | Parameters: domain - The domain to set. |
setFilterClassName | public void setFilterClassName(String filterClassName)(Code) | | Parameters: filterClassName - The filterClassName to set. |
setImageParsing | public void setImageParsing(boolean imageParsing)(Code) | | Parameters: imageParsing - The imageParsing to set. |
setLogFile | public void setLogFile(String path)(Code) | | Set the path where XML messages are stored for random selection.
|
setParserClassName | public void setParserClassName(String classname)(Code) | | it's kinda obvious, but we state it anyways. Set the xml file with a
string path.
Parameters: classname - -parser class name |
setPortString | public void setPortString(String port)(Code) | | Parameters: port - The port to set. |
testEnded | public void testEnded()(Code) | | |
testStarted | public void testStarted()(Code) | | |
threadFinished | public void threadFinished()(Code) | | |
Methods inherited from org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase | public void addArgument(String name, String value)(Code)(Java Doc) public void addArgument(String name, String value, String metadata)(Code)(Java Doc) public void addEncodedArgument(String name, String value)(Code)(Java Doc) public void addEncodedArgument(String name, String value, String metaData, String contentEncoding)(Code)(Java Doc) public void addEncodedArgument(String name, String value, String metaData)(Code)(Java Doc) public void addNonEncodedArgument(String name, String value, String metadata)(Code)(Java Doc) public void addTestElement(TestElement el)(Code)(Java Doc) public Object clone()(Code)(Java Doc) protected HTTPSampleResult downloadPageResources(HTTPSampleResult res, HTTPSampleResult container, int frameDepth)(Code)(Java Doc) protected static String encodeBackSlashes(String value)(Code)(Java Doc) protected String encodeSpaces(String path)(Code)(Java Doc) protected HTTPSampleResult errorResult(Throwable e, HTTPSampleResult res)(Code)(Java Doc) protected HTTPSampleResult followRedirects(HTTPSampleResult res, int frameDepth)(Code)(Java Doc) public Arguments getArguments()(Code)(Java Doc) public AuthManager getAuthManager()(Code)(Java Doc) public boolean getAutoRedirects()(Code)(Java Doc) public String getClient()(Code)(Java Doc) public String getContentEncoding()(Code)(Java Doc) public CookieManager getCookieManager()(Code)(Java Doc) public static int getDefaultPort(String protocol, int port)(Code)(Java Doc) public boolean getDoMultipartPost()(Code)(Java Doc) public String getDomain()(Code)(Java Doc) public String getEmbeddedUrlRE()(Code)(Java Doc) public String getFileField()(Code)(Java Doc) public String getFilename()(Code)(Java Doc) public boolean getFollowRedirects()(Code)(Java Doc) public HeaderManager getHeaderManager()(Code)(Java Doc) public String getImplementation()(Code)(Java Doc) public String getMethod()(Code)(Java Doc) public String getMimetype()(Code)(Java Doc) public String getMonitor()(Code)(Java Doc) public String getPath()(Code)(Java Doc) public int getPort()(Code)(Java Doc) public String getProtocol()(Code)(Java Doc) public String getQueryString()(Code)(Java Doc) public String getQueryString(String contentEncoding)(Code)(Java Doc) public boolean getSendFileAsPostBody()(Code)(Java Doc) public boolean getSendParameterValuesAsPostBody()(Code)(Java Doc) public URL getUrl() throws MalformedURLException(Code)(Java Doc) public boolean getUseKeepAlive()(Code)(Java Doc) public boolean getUseMultipartForPost()(Code)(Java Doc) public static String[] getValidMethodsAsArray()(Code)(Java Doc) public boolean hasArguments()(Code)(Java Doc) protected boolean hasUploadableFiles()(Code)(Java Doc) public boolean isImageParser()(Code)(Java Doc) public boolean isMonitor()(Code)(Java Doc) public boolean isProtocolDefaultPort()(Code)(Java Doc) public static boolean isSecure(String protocol)(Code)(Java Doc) public static boolean isSecure(URL url)(Code)(Java Doc) protected boolean isSuccessCode(int code)(Code)(Java Doc) public void parseArguments(String queryString, String contentEncoding)(Code)(Java Doc) public void parseArguments(String queryString)(Code)(Java Doc) protected HTTPSampleResult resultProcessing(boolean areFollowingRedirect, int frameDepth, HTTPSampleResult res)(Code)(Java Doc) public SampleResult sample(Entry e)(Code)(Java Doc) public SampleResult sample()(Code)(Java Doc) abstract protected HTTPSampleResult sample(URL u, String method, boolean areFollowingRedirect, int depth)(Code)(Java Doc) public void setArguments(Arguments value)(Code)(Java Doc) public void setAuthManager(AuthManager value)(Code)(Java Doc) public void setAutoRedirects(boolean value)(Code)(Java Doc) public void setClient(String client)(Code)(Java Doc) public void setContentEncoding(String value)(Code)(Java Doc) public void setCookieManager(CookieManager value)(Code)(Java Doc) public void setDoMultipartPost(boolean value)(Code)(Java Doc) public void setDomain(String value)(Code)(Java Doc) public void setEmbeddedUrlRE(String regex)(Code)(Java Doc) public void setFileField(String value)(Code)(Java Doc) public void setFilename(String value)(Code)(Java Doc) public void setFollowRedirects(boolean value)(Code)(Java Doc) public void setHeaderManager(HeaderManager value)(Code)(Java Doc) public void setImageParser(boolean parseImages)(Code)(Java Doc) public void setImplementation(String value)(Code)(Java Doc) public void setMethod(String value)(Code)(Java Doc) public void setMimetype(String value)(Code)(Java Doc) public void setMonitor(String value)(Code)(Java Doc) public void setMonitor(boolean truth)(Code)(Java Doc) public void setPath(String path)(Code)(Java Doc) public void setPath(String path, String contentEncoding)(Code)(Java Doc) public void setPort(int value)(Code)(Java Doc) public void setProtocol(String value)(Code)(Java Doc) public void setUseKeepAlive(boolean value)(Code)(Java Doc) public void testEnded()(Code)(Java Doc) public void testEnded(String host)(Code)(Java Doc) public void testIterationStart(LoopIterationEvent event)(Code)(Java Doc) public void testStarted()(Code)(Java Doc) public void testStarted(String host)(Code)(Java Doc) public void threadFinished()(Code)(Java Doc) public void threadStarted()(Code)(Java Doc) public String toString()(Code)(Java Doc)
|
|
|