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.ConnectionAbstract
-
- org.apache.activemq.artemis.cli.commands.messages.perf.PerfCommand
-
- All Implemented Interfaces:
Action
- Direct Known Subclasses:
PerfClientCommand,PerfConsumerCommand,PerfProducerCommand
public abstract class PerfCommand extends ConnectionAbstract
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<java.lang.String>destinationsprotected intdurationprotected java.lang.StringhdrFileNameprotected longmessageCountprotected intnumDestinationsprotected java.lang.StringreportFileNameprotected booleanshowLatencyprotected intwarmup-
Fields inherited from class org.apache.activemq.artemis.cli.commands.messages.ConnectionAbstract
acceptor, brokerURL, clientID, password, protocol, 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
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleancollectAndReportStatisticsWhileRunning(boolean warmingUp, LiveStatistics statistics, java.lang.StringBuilder skratchBuffer, long endWarmup, long end, BenchmarkService benchmark)java.lang.Objectexecute(ActionContext context)java.util.concurrent.CountDownLatchgetCompleted()java.util.List<java.lang.String>getDestinations()intgetDuration()java.lang.StringgetHdrFileName()longgetMessageCount()intgetNumDestinations()java.lang.StringgetReportFileName()intgetWarmup()booleanisShowLatency()protected javax.jms.Destination[]lookupDestinations(javax.jms.ConnectionFactory factory)protected abstract voidonExecuteBenchmark(javax.jms.ConnectionFactory factory, javax.jms.Destination[] jmsDestinations, ActionContext context)protected abstract voidonInterruptBenchmark()PerfCommandsetDestinations(java.util.List<java.lang.String> destinations)PerfCommandsetDuration(int duration)PerfCommandsetHdrFileName(java.lang.String hdrFileName)PerfCommandsetMessageCount(long messageCount)PerfCommandsetNumDestinations(int numDestinations)PerfCommandsetReportFileName(java.lang.String reportFileName)PerfCommandsetShowLatency(boolean showLatency)PerfCommandsetWarmup(int warmup)-
Methods inherited from class org.apache.activemq.artemis.cli.commands.messages.ConnectionAbstract
createConnectionFactory, createConnectionFactory, createCoreConnectionFactory, createCoreConnectionFactory, getAcceptor, getBrokerURL, getClientID, getPassword, getProtocol, getUser, setAcceptor, setBrokerURL, setClientID, setPassword, setProtocol, 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
checkOptions, getActionContext, getBrokerConfiguration, getBrokerEtc, getBrokerHome, getBrokerInstance, getBrokerURIInstance, getBrokerURLInstance, isVerbose, setHomeValues
-
-
-
-
Field Detail
-
showLatency
protected boolean showLatency
-
reportFileName
protected java.lang.String reportFileName
-
hdrFileName
protected java.lang.String hdrFileName
-
duration
protected int duration
-
warmup
protected int warmup
-
messageCount
protected long messageCount
-
numDestinations
protected int numDestinations
-
destinations
protected java.util.List<java.lang.String> destinations
-
-
Method Detail
-
execute
public java.lang.Object execute(ActionContext context) throws java.lang.Exception
- Specified by:
executein interfaceAction- Overrides:
executein classConnectionAbstract- Throws:
java.lang.Exception
-
onExecuteBenchmark
protected abstract void onExecuteBenchmark(javax.jms.ConnectionFactory factory, javax.jms.Destination[] jmsDestinations, ActionContext context) throws java.lang.Exception- Throws:
java.lang.Exception
-
onInterruptBenchmark
protected abstract void onInterruptBenchmark()
-
collectAndReportStatisticsWhileRunning
protected boolean collectAndReportStatisticsWhileRunning(boolean warmingUp, LiveStatistics statistics, java.lang.StringBuilder skratchBuffer, long endWarmup, long end, BenchmarkService benchmark) throws java.io.IOException- Throws:
java.io.IOException
-
lookupDestinations
protected final javax.jms.Destination[] lookupDestinations(javax.jms.ConnectionFactory factory) throws java.lang.Exception- Throws:
java.lang.Exception
-
isShowLatency
public boolean isShowLatency()
-
setShowLatency
public PerfCommand setShowLatency(boolean showLatency)
-
getReportFileName
public java.lang.String getReportFileName()
-
setReportFileName
public PerfCommand setReportFileName(java.lang.String reportFileName)
-
getHdrFileName
public java.lang.String getHdrFileName()
-
setHdrFileName
public PerfCommand setHdrFileName(java.lang.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)
-
getDestinations
public java.util.List<java.lang.String> getDestinations()
-
setDestinations
public PerfCommand setDestinations(java.util.List<java.lang.String> destinations)
-
getCompleted
public java.util.concurrent.CountDownLatch getCompleted()
-
-