Class PerfCommand
- java.lang.Object
-
- org.apache.activemq.artemis.cli.commands.ActionAbstract
-
- org.apache.activemq.artemis.cli.commands.InputAbstract
-
- org.apache.activemq.artemis.cli.commands.messages.ConnectionConfigurationAbtract
-
- org.apache.activemq.artemis.cli.commands.messages.BasicConnectionAbstract
-
- org.apache.activemq.artemis.cli.commands.messages.ConnectionAbstract
-
- org.apache.activemq.artemis.cli.commands.messages.perf.PerfCommand
-
- Direct Known Subclasses:
PerfClientCommand,PerfConsumerCommand,PerfProducerCommand
public abstract class PerfCommand extends ConnectionAbstract
-
-
Field Summary
Fields Modifier and Type Field Description protected longcommitIntervalprotected List<String>destinationsprotected intdurationprotected StringhdrFileNameprotected longmessageCountprotected intnumDestinationsprotected StringreportFileNameprotected booleanshowLatencyprotected longtxSizeprotected intwarmup-
Fields inherited from class org.apache.activemq.artemis.cli.commands.messages.ConnectionAbstract
clientID, protocol
-
Fields inherited from class org.apache.activemq.artemis.cli.commands.messages.ConnectionConfigurationAbtract
acceptor, brokerURL, CONNECTION_INFORMATION, password, silent, user
-
Fields inherited from class org.apache.activemq.artemis.cli.commands.ActionAbstract
DEFAULT_BROKER_ACCEPTOR, DEFAULT_BROKER_URL, verbose
-
-
Constructor Summary
Constructors Constructor Description PerfCommand()
-
Method Summary
-
Methods inherited from class org.apache.activemq.artemis.cli.commands.messages.ConnectionAbstract
createConnectionFactory, createConnectionFactory, createCoreConnectionFactory, createCoreConnectionFactory, getClientID, getProtocol, setClientID, setProtocol, setProtocol
-
Methods inherited from class org.apache.activemq.artemis.cli.commands.messages.BasicConnectionAbstract
createConnectionFactory, performCoreManagement, performCoreManagement, tryConnect
-
Methods inherited from class org.apache.activemq.artemis.cli.commands.messages.ConnectionConfigurationAbtract
getAcceptor, getBrokerURL, getPassword, getUser, inputBrokerURL, inputPassword, inputUser, recoverConnectionInformation, saveConnectionInfo, setAcceptor, setBrokerURL, setPassword, setUser
-
Methods inherited from class org.apache.activemq.artemis.cli.commands.InputAbstract
enableInput, input, input, inputBoolean, inputInteger, inputPassword, isSilentInput, setSilentInput
-
Methods inherited from class org.apache.activemq.artemis.cli.commands.ActionAbstract
done, getActionContext, getBrokerConfiguration, getBrokerEtc, getBrokerHome, getBrokerInstance, getBrokerURIInstance, getBrokerURLInstance, isVerbose, run, setHomeValues
-
-
-
-
Field Detail
-
showLatency
protected boolean showLatency
-
reportFileName
protected String reportFileName
-
hdrFileName
protected String hdrFileName
-
duration
protected int duration
-
warmup
protected int warmup
-
messageCount
protected long messageCount
-
numDestinations
protected int numDestinations
-
txSize
protected long txSize
-
commitInterval
protected long commitInterval
-
-
Method Detail
-
execute
public Object execute(ActionContext context) throws Exception
- Specified by:
executein interfaceAction- Overrides:
executein classConnectionConfigurationAbtract- Throws:
Exception
-
onExecuteBenchmark
protected abstract void onExecuteBenchmark(javax.jms.ConnectionFactory factory, javax.jms.Destination[] jmsDestinations, ActionContext context) throws Exception- Throws:
Exception
-
onInterruptBenchmark
protected abstract void onInterruptBenchmark()
-
collectAndReportStatisticsWhileRunning
protected boolean collectAndReportStatisticsWhileRunning(boolean warmingUp, LiveStatistics statistics, StringBuilder skratchBuffer, long endWarmup, long end, BenchmarkService benchmark) throws IOException- Throws:
IOException
-
lookupDestinations
protected final javax.jms.Destination[] lookupDestinations(javax.jms.ConnectionFactory factory) throws Exception- Throws:
Exception
-
isShowLatency
public boolean isShowLatency()
-
setShowLatency
public PerfCommand setShowLatency(boolean showLatency)
-
getReportFileName
public String getReportFileName()
-
setReportFileName
public PerfCommand setReportFileName(String reportFileName)
-
getHdrFileName
public String getHdrFileName()
-
setHdrFileName
public PerfCommand setHdrFileName(String hdrFileName)
-
getDuration
public int getDuration()
-
setDuration
public PerfCommand setDuration(int duration)
-
getWarmup
public int getWarmup()
-
setWarmup
public PerfCommand setWarmup(int warmup)
-
getMessageCount
public long getMessageCount()
-
setMessageCount
public PerfCommand setMessageCount(long messageCount)
-
getNumDestinations
public int getNumDestinations()
-
setNumDestinations
public PerfCommand setNumDestinations(int numDestinations)
-
setDestinations
public PerfCommand setDestinations(List<String> destinations)
-
getCompleted
public CountDownLatch getCompleted()
-
-