public class ExampleSampler extends AbstractSampler
JMeter creates an instance of a sampler class for every occurrence of the element in every thread. [some additional copies may be created before the test run starts]
Thus each sampler is guaranteed to be called by a single thread - there is no need to synchronize access to instance variables.
However, access to class fields must be synchronized.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DATA |
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
Constructor and Description |
---|
ExampleSampler() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getData() |
SampleResult |
sample(Entry e)
Obtains statistics about the given Entry, and packages the information
into a SampleResult.
|
applies
addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addTestElement, canRemove, clear, clearTestElementChildren, clone, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removed, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
public static final java.lang.String DATA
public SampleResult sample(Entry e)
e
- the Entry (TODO seems to be unused)public java.lang.String getData()
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.