org.apache.jmeter.protocol.http.util.accesslog
Class StandardGenerator
java.lang.Object
org.apache.jmeter.protocol.http.util.accesslog.StandardGenerator
- Generator, Serializable
public class StandardGenerator
Description:
StandardGenerator will be the default generator used to pre-process logs. It
uses JMeter classes to generate the .jmx file. The first version of the
utility only generated the HTTP requests as XML, but it required users to
copy and paste it into a blank jmx file. Doing that way isn't flexible and
would require changes to keep the format in sync.
This version is a completely new class with a totally different
implementation, since generating the XML is no longer handled by the
generator. The generator is only responsible for handling the parsed results
and passing it to the appropriate JMeter class.
Notes:
the class needs to first create a thread group and add it to the HashTree.
Then the samplers should be added to the thread group. Listeners shouldn't be
added and should be left up to the user. One option is to provide parameters,
so the user can pass the desired listener to the tool.
FILENAME
protected String FILENAME
OUTPUT
protected OutputStream OUTPUT
WRITER
protected FileWriter WRITER
StandardGenerator
public StandardGenerator()
The constructor is used by GUI and samplers to generate request objects.
StandardGenerator
public StandardGenerator(String file)
initStream
protected void initStream()
Create the FileWriter to save the JMX file.
reset
public void reset()
Reset the HTTPSampler to make sure it is a new instance.
- reset in interface Generator
save
public void save()
save must be called to write the jmx file, otherwise it will not be
saved.
- save in interface Generator
Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.