Logo Search packages:      
Sourcecode: jakarta-jmeter version File versions  Download package

org::apache::jmeter::protocol::http::sampler::AccessLogSampler Class Reference

Inheritance diagram for org::apache::jmeter::protocol::http::sampler::AccessLogSampler:

org::apache::jmeter::protocol::http::sampler::HTTPSampler org::apache::jmeter::testbeans::TestBean org::apache::jmeter::testelement::ThreadListener org::apache::jmeter::protocol::http::sampler::HTTPSamplerBase org::apache::jmeter::samplers::Interruptible org::apache::jmeter::testelement::TestListener org::apache::jmeter::testelement::ThreadListener org::apache::jmeter::protocol::http::util::HTTPConstantsInterface org::apache::jmeter::samplers::Sampler

List of all members.


Detailed Description

Description:

AccessLogSampler is responsible for a couple of things:

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

Definition at line 67 of file AccessLogSampler.java.


Public Member Functions

void addArgument (String name, String value, String metadata)
void addArgument (String name, String value)
void addEncodedArgument (String name, String value, String metaData)
void addEncodedArgument (String name, String value, String metaData, String contentEncoding)
void addEncodedArgument (String name, String value)
void addNonEncodedArgument (String name, String value, String metadata)
void addTestElement (TestElement el)
boolean canRemove ()
void clear ()
Object clone ()
boolean equals (Object o)
Arguments getArguments ()
AuthManager getAuthManager ()
boolean getAutoRedirects ()
CacheManager getCacheManager ()
String getClient ()
String getComment ()
int getConnectTimeout ()
String getContentEncoding ()
CookieManager getCookieManager ()
String getDomain ()
boolean getDoMultipartPost ()
String getEmbeddedUrlRE ()
String getFileField ()
String getFilename ()
String getFilterClassName ()
boolean getFollowRedirects ()
HeaderManager getHeaderManager ()
int getHTTPFileCount ()
HTTPFileArg[] getHTTPFiles ()
String getImplementation ()
String getLogFile ()
String getMethod ()
String getMimetype ()
String getMonitor ()
String getName ()
String getParserClassName ()
String getPath ()
int getPort ()
int getPortIfSpecified ()
String getPortString ()
JMeterProperty getProperty (String key)
boolean getPropertyAsBoolean (String key, boolean defaultVal)
boolean getPropertyAsBoolean (String key)
double getPropertyAsDouble (String key)
float getPropertyAsFloat (String key)
int getPropertyAsInt (String key, int defaultValue)
int getPropertyAsInt (String key)
long getPropertyAsLong (String key)
String getPropertyAsString (String key, String defaultValue)
String getPropertyAsString (String key)
String getProtocol ()
String getQueryString (String contentEncoding)
String getQueryString ()
int getResponseTimeout ()
boolean getSendFileAsPostBody ()
boolean getSendParameterValuesAsPostBody ()
JMeterContext getThreadContext ()
String getThreadName ()
URL getUrl () throws MalformedURLException
boolean getUseKeepAlive ()
boolean getUseMultipartForPost ()
boolean hasArguments ()
int hashCode ()
void instantiateParser ()
boolean interrupt ()
boolean isEnabled ()
boolean isImageParser ()
boolean isImageParsing ()
boolean isMonitor ()
boolean isProtocolDefaultPort ()
boolean isRunningVersion ()
boolean isTemporary (JMeterProperty property)
void parseArguments (String queryString)
void parseArguments (String queryString, String contentEncoding)
PropertyIterator propertyIterator ()
byte[] readResponse (SampleResult sampleResult, InputStream in, int length) throws IOException
void recoverRunningVersion ()
void removeProperty (String key)
SampleResult sample ()
SampleResult sample (Entry e)
SampleResult sampleWithParser ()
void setArguments (Arguments value)
void setAuthManager (AuthManager value)
void setAutoRedirects (boolean value)
void setCacheManager (CacheManager value)
void setClient (String client)
void setComment (String comment)
void setConnectTimeout (String value)
void setContentEncoding (String value)
void setCookieManager (CookieManager value)
void setDomain (String domain)
void setDoMultipartPost (boolean value)
void setEmbeddedUrlRE (String regex)
void setFileField (String value)
void setFilename (String value)
void setFilterClassName (String filterClassName)
void setFollowRedirects (boolean value)
void setHeaderManager (HeaderManager value)
void setHTTPFiles (HTTPFileArg[] files)
void setImageParser (boolean parseImages)
void setImageParsing (boolean imageParsing)
void setImplementation (String value)
void setLogFile (String path)
void setMD5 (boolean truth)
void setMethod (String value)
void setMimetype (String value)
void setMonitor (boolean truth)
void setMonitor (String value)
void setName (String name)
void setParserClassName (String classname)
void setPath (String path, String contentEncoding)
void setPath (String path)
void setPort (int value)
void setPortString (String port)
void setProperty (String name, int value, int dflt)
void setProperty (String name, int value)
void setProperty (String name, boolean value, boolean dflt)
void setProperty (String name, boolean value)
void setProperty (String name, String value, String dflt)
void setProperty (String name, String value)
void setProperty (JMeterProperty property)
void setProtocol (String value)
void setResponseTimeout (String value)
void setRunningVersion (boolean runningVersion)
void setTemporary (JMeterProperty property)
void setThreadContext (JMeterContext inthreadContext)
void setThreadName (String inthreadName)
void setUseKeepAlive (boolean value)
void testEnded (String host)
void testEnded ()
void testIterationStart (LoopIterationEvent event)
void testStarted (String host)
void testStarted ()
void threadFinished ()
void threadStarted ()
String toString ()
void traverse (TestElementTraverser traverser)
boolean useMD5 ()

Static Public Member Functions

static int getDefaultPort (String protocol, int port)
static String[] getValidMethodsAsArray ()
static boolean isSecure (URL url)
static boolean isSecure (String protocol)

Static Public Attributes

static final String APPLICATION_X_WWW_FORM_URLENCODED = "application/x-www-form-urlencoded"
static final String ARGUMENTS = "HTTPsampler.Arguments"
static final String AUTH_MANAGER = "HTTPSampler.auth_manager"
static final String AUTO_REDIRECTS = "HTTPSampler.auto_redirects"
static final String CACHE_MANAGER = "HTTPSampler.cache_manager"
static final String CLIENT = "HTTPSampler.client"
static final String COMMENTS = "TestPlan.comments"
static final String CONNECT_TIMEOUT = "HTTPSampler.connect_timeout"
static final String CONNECTION_CLOSE = "close"
static final String CONTENT_ENCODING = "HTTPSampler.contentEncoding"
static final String CONTENT_TYPE = "HTTPSampler.CONTENT_TYPE"
static final String COOKIE_MANAGER = "HTTPSampler.cookie_manager"
static final String DEFAULT_CLASS = "org.apache.jmeter.protocol.http.util.accesslog.TCLogParser"
static final int DEFAULT_HTTP_PORT = 80
static final String DEFAULT_HTTP_PORT_STRING = "80"
static final int DEFAULT_HTTPS_PORT = 443
static final String DEFAULT_HTTPS_PORT_STRING = "443"
static final String DEFAULT_METHOD = GET
static final String DELETE = "DELETE"
static final String DO_MULTIPART_POST = "HTTPSampler.DO_MULTIPART_POST"
static final String DOMAIN = "HTTPSampler.domain"
static final String EMBEDDED_URL_RE = "HTTPSampler.embedded_url_re"
static final String ENABLED = "TestElement.enabled"
static final String ENCODING_GZIP = "gzip"
static final String ETAG = "Etag"
static final String FOLLOW_REDIRECTS = "HTTPSampler.follow_redirects"
static final String GET = "GET"
static final String GUI_CLASS = "TestElement.gui_class"
static final String HEAD = "HEAD"
static final String HEADER_AUTHORIZATION = "Authorization"
static final String HEADER_CONNECTION = "Connection"
static final String HEADER_CONTENT_DISPOSITION = "Content-Disposition"
static final String HEADER_CONTENT_ENCODING = "content-encoding"
static final String HEADER_CONTENT_LENGTH = "Content-Length"
static final String HEADER_CONTENT_TYPE = "Content-Type"
static final String HEADER_COOKIE = "Cookie"
static final String HEADER_LOCATION = "Location"
static final String HEADER_MANAGER = "HTTPSampler.header_manager"
static final String HEADER_SET_COOKIE = "set-cookie"
static final String HTTP_1_1 = "HTTP/1.1"
static final String IF_MODIFIED_SINCE = "If-Modified-Since"
static final String IF_NONE_MATCH = "If-None-Match"
static final String IMAGE_PARSER = "HTTPSampler.image_parser"
static final String IMPLEMENTATION = "HTTPSampler.implementation"
static final String KEEP_ALIVE = "keep-alive"
static final String LAST_MODIFIED = "Last-Modified"
static final String METHOD = "HTTPSampler.method"
static final String MONITOR = "HTTPSampler.monitor"
static final String MULTIPART_FORM_DATA = "multipart/form-data"
static final String NAME = "TestElement.name"
static final String OPTIONS = "OPTIONS"
static final String PATH = "HTTPSampler.path"
static final String PORT = "HTTPSampler.port"
static final String POST = "POST"
static final String PROTOCOL = "HTTPSampler.protocol"
static final String PROTOCOL_HTTP = "http"
static final String PROTOCOL_HTTPS = "https"
static final String PUT = "PUT"
static final String RESPONSE_TIMEOUT = "HTTPSampler.response_timeout"
static final String TEST_CLASS = "TestElement.test_class"
static final String TRACE = "TRACE"
static final String TRANSFER_ENCODING = "transfer-encoding"
static final int UNSPECIFIED_PORT = 0
static final String UNSPECIFIED_PORT_AS_STRING = "0"
static final String URL = "HTTPSampler.URL"
static final int URL_UNSPECIFIED_PORT = -1
static final String URL_UNSPECIFIED_PORT_AS_STRING = "-1"
static final String USE_KEEPALIVE = "HTTPSampler.use_keepalive"

Protected Member Functions

void addProperty (JMeterProperty property)
void clearTemporary (JMeterProperty property)
void disconnect (HttpURLConnection conn)
HTTPSampleResult downloadPageResources (HTTPSampleResult res, HTTPSampleResult container, int frameDepth)
void emptyTemporary ()
String encodeSpaces (String path)
HTTPSampleResult errorResult (Throwable e, HTTPSampleResult res)
HTTPSampleResult followRedirects (HTTPSampleResult res, int frameDepth)
String getResponseHeaders (HttpURLConnection conn)
void initFilter ()
boolean isSuccessCode (int code)
void logProperties ()
void mergeIn (TestElement element)
byte[] readResponse (HttpURLConnection conn, SampleResult res) throws IOException
HTTPSampleResult resultProcessing (boolean areFollowingRedirect, int frameDepth, HTTPSampleResult res)
HTTPSampleResult sample (URL url, String method, boolean areFollowingRedirect, int frameDepth)
String sendPostData (URLConnection connection) throws IOException
void setPostHeaders (URLConnection conn) throws IOException
HttpURLConnection setupConnection (URL u, String method, HTTPSampleResult res) throws IOException
void traverseCollection (CollectionProperty col, TestElementTraverser traverser)
void traverseMap (MapProperty map, TestElementTraverser traverser)
void traverseProperty (TestElementTraverser traverser, JMeterProperty value)

Static Protected Member Functions

static String encodeBackSlashes (String value)

Static Protected Attributes

static final int MAX_FRAME_DEPTH = JMeterUtils.getPropDefault("httpsampler.max_frame_depth", 5)
static final int MAX_REDIRECTS = JMeterUtils.getPropDefault("httpsampler.max_redirects", 5)
static final String NON_HTTP_RESPONSE_CODE = "Non HTTP response code"
static final String NON_HTTP_RESPONSE_MESSAGE = "Non HTTP response message"

Static Package Functions

 [static initializer]

Private Attributes

int count = 0
transient Filter filter
String filterClassName
String logFile
transient LogParser PARSER = null
String parserClassName
boolean started = false

Static Private Attributes

static final Logger log = LoggingManager.getLoggerForClass()
static final long serialVersionUID = 232L

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index