Class ProducerBenchmark
- java.lang.Object
-
- org.apache.activemq.artemis.cli.commands.messages.perf.ProducerBenchmark
-
- All Implemented Interfaces:
AutoCloseable,BenchmarkService
public final class ProducerBenchmark extends Object implements BenchmarkService
-
-
Constructor Summary
Constructors Constructor Description ProducerBenchmark(javax.jms.ConnectionFactory factory, MicrosTimeProvider timeProvider, io.netty.channel.EventLoopGroup loopGroup, int producers, long messageCount, boolean sharedConnections, String group, long ttl, int messageSize, javax.jms.Destination[] destinations, boolean persistent, long maxPending, long transactionCapacity, Long messageRate, boolean enableMessageID, boolean enableTimestamp)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleananyError()CompletionStage<?>asyncClose()After this, now new messages are sent, but there still be some to be completed: the return value can be used to await completions to arrive.voidclose()longexpectedTotalMessageCountToReceive(int sharedSubscriptions, int consumersPerDestination)static longexpectedTotalMessageCountToReceive(Stream<ObjLongPair<javax.jms.Destination>> messageSentPerDestination, int sharedSubscriptions, int consumersPerDestination)ProducerLoadGenerator[]getGenerators()booleanisRunning()ProducerBenchmarkstart()
-
-
-
Constructor Detail
-
ProducerBenchmark
public ProducerBenchmark(javax.jms.ConnectionFactory factory, MicrosTimeProvider timeProvider, io.netty.channel.EventLoopGroup loopGroup, int producers, long messageCount, boolean sharedConnections, String group, long ttl, int messageSize, javax.jms.Destination[] destinations, boolean persistent, long maxPending, long transactionCapacity, Long messageRate, boolean enableMessageID, boolean enableTimestamp)
-
-
Method Detail
-
expectedTotalMessageCountToReceive
public long expectedTotalMessageCountToReceive(int sharedSubscriptions, int consumersPerDestination)
-
expectedTotalMessageCountToReceive
public static long expectedTotalMessageCountToReceive(Stream<ObjLongPair<javax.jms.Destination>> messageSentPerDestination, int sharedSubscriptions, int consumersPerDestination)
-
getGenerators
public ProducerLoadGenerator[] getGenerators()
-
anyError
public boolean anyError()
- Specified by:
anyErrorin interfaceBenchmarkService
-
isRunning
public boolean isRunning()
- Specified by:
isRunningin interfaceBenchmarkService
-
start
public ProducerBenchmark start()
- Specified by:
startin interfaceBenchmarkService
-
asyncClose
public CompletionStage<?> asyncClose()
After this, now new messages are sent, but there still be some to be completed: the return value can be used to await completions to arrive.
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceBenchmarkService
-
-