Class SampleWriterConsumer
-
- All Implemented Interfaces:
-
org.apache.jmeter.report.processor.SampleConsumer
,org.apache.jmeter.report.processor.SampleProcessor
,org.apache.jmeter.report.processor.SampleProducer
public class SampleWriterConsumer extends AbstractSampleConsumer
Sample consumed by this consumer are written to a file
- Since:
3.0
-
-
Field Summary
Fields Modifier and Type Field Description public File
outputFile
public String
name
public SampleContext
sampleContext
-
Constructor Summary
Constructors Constructor Description SampleWriterConsumer()
-
Method Summary
Modifier and Type Method Description File
getOutputFile()
void
setOutputFile(File outputFile)
void
setOutputFile(String outputFile)
File
getOutputFile(int channel)
void
setWriteHeader(boolean writeHeader)
Enables the CSV header on the output file (defaults to false) void
startConsuming()
Start the sample consuming. void
consume(Sample s, int channel)
Consumes the specified sample ton the specified channel. void
stopConsuming()
Stops the consuming process. -
Methods inherited from class org.apache.jmeter.report.processor.AbstractSampleConsumer
addSampleConsumer, getConsumedChannelCount, getConsumedMetadata, getName, getWorkingDirectory, produce, removeSampleConsumer, setChannelAttribute, setConsumedMetadata, setName, setProducedMetadata, setSampleConsumer, setSampleConsumers, setSampleContext, startProducing, stopProducing
-
Methods inherited from class org.apache.jmeter.report.processor.AbstractSampleProcessor
getChannelAttribute, getSampleContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getOutputFile
File getOutputFile()
-
setOutputFile
void setOutputFile(File outputFile)
-
setOutputFile
void setOutputFile(String outputFile)
-
getOutputFile
File getOutputFile(int channel)
-
setWriteHeader
void setWriteHeader(boolean writeHeader)
Enables the CSV header on the output file (defaults to false)
- Parameters:
writeHeader
- flag, whether CSV header should be written
-
startConsuming
void startConsuming()
Start the sample consuming. This step is used by consumer to initialize their process.
-
consume
void consume(Sample s, int channel)
Consumes the specified sample ton the specified channel.
- Parameters:
s
- The sample to be consumedchannel
- The channel on which the sample is consumed
-
stopConsuming
void stopConsuming()
Stops the consuming process. No sample will be processed after this service has been called.
-
-
-
-