Running Maven 2 Performance Test

运行Maven 2性能测试。

This Maven 2 plugin allows you to run performance tests easily using the Maven command line or run tests automatically in Continuum

这个Maven 2插件允许您轻松地使用Maven命令行运行性能测试,或者在连续体中自动运行测试。

Prerequisites

先决条件

Starting with ActiveMQ 5.5 and above the plugin can be obtained from maven or if you download the src from SVN you can build it yourself. Start with a complete build of Apache ActiveMQ and then do

从ActiveMQ 5.5开始,插件可以从maven获得,或者如果您从SVN下载src,您可以自己构建它。从完整的Apache ActiveMQ构建开始,然后执行。

cd activemq-tooling
mvn clean install

To run the following Maven goals make sure you are inside a Maven2 project directory where its POM is enabled with the Maven2 plugin.

要运行以下Maven目标,请确保您在Maven2项目目录中,其中POM是通过Maven2插件启用的。

Getting started

开始

To get started, switch to the activemq-perftest directory from the sandbox repo, or to a directory containing your own Maven POM with the following plugin defined:

要启动,请从sandbox repo切换到activemq-perftest目录,或者到包含您自己的Maven POM的目录,并定义如下插件:

<plugin>
  <groupId>org.apache.activemq.tooling</groupId>
  <artifactId>activemq-perf-maven-plugin</artifactId>
  <version>${activemq-version}</version>
</plugin>

In ActiveMQ versions prior to 5.8, the artifactId was maven-activemq-perf-plugin.

在5.8之前的ActiveMQ版本中,artifactId是maven-activemq-perf-plugin。

Type the following commands into separate shells (the broker line here is optional if you have a preconfigured one running):

将下面的命令输入到不同的shell中(如果您有一个预配置的操作,则这里的代理行是可选的):

mvn activemq-perf:broker -Durl=broker:tcp://localhost:61616
mvn activemq-perf:consumer
mvn activemq-perf:producer

If you run the broker on a different machine then change the producer and consumer commands to

如果您在另一台机器上运行代理,则将生产者和消费者命令更改为。

mvn activemq-perf:consumer -Dfactory.brokerURL=tcp://host:port
mvn activemq-perf:producer -Dfactory.brokerURL=tcp://host:port

where you switch host:port with the actual values.

在哪里切换主机:端口与实际值。

When you run the producer & consumer, it generates an XML performance report in the current directory, so that you can graph and chart the results etc. See the sample report

当您运行生产者和消费者时,它会在当前目录中生成一个XML性能报告,以便您可以图和图表结果等。

Maven goals

Maven目标

Goal

目标

Description

描述

activemq-perf:broker

activemq-perf:代理

Starts broker using the activemq configuration file located in "src\main\resources\broker-conf" where the default config is activemq.xml.
Parameters:
 1. -DconfigType - specifies the type of configuration to use. Its value must be one of the filename in the "..\broker-config" directory (e.g. -DconfigType=kaha).
 2. -DconfigFile - path to config file other than those in "src\..\broker-config".e.g -DconfigFile=c:\dir\activemq.xml)

在默认配置为activemq.xml的“src\main\resources\broker-conf”中使用activemq配置文件启动代理。参数:1。- dconfigtype——指定要使用的配置类型。它的值必须是“..”中的一个文件名。\ broker-config”目录(例如-DconfigType = kaha)。2。- dconfig文件-配置文件的路径,而不是"src\. \broker-config".e。g -DconfigFile = c:\ dir \ activemq.xml)

activemq-perf:consumer

activemq-perf:消费者

Starts the consumer's performance testing. The generated report file can be found in the directory specified in the parameter "sysTest.reportDir".

启动消费者的性能测试。生成的报告文件可以在参数“sysTest.reportDir”中指定的目录中找到。

activemq-perf:producer

activemq-perf:生产商

Starts the producer's performance testing. The generated report file can be found in the directory specified in the parameter "sysTest.reportDir".

启动生产者的性能测试。生成的报告文件可以在参数“sysTest.reportDir”中指定的目录中找到。

1 Note:The parameters for both consumer and producers are described in the next section. (sample report)

注:下一节将介绍消费者和生产者的参数。(样品的报告)

Configuration for running a system of JMS Clients (Producer/Consumer)

运行JMS客户端系统的配置(生产者/消费者)

Configuration Key

配置关键

Default Value

默认值

Description

描述

sysTest.propsConfigFile

sysTest.propsConfigFile

null

Use properties specified externally in a key=value properties file

在键=值属性文件中使用外部指定的属性。

sysTest.clientPrefix

sysTest.clientPrefix

JmsConsumer or JmsProducer

JmsConsumer或JmsProducer

Specifies the client name prefix that will be use for each system. By default it will use JmsConsumer for consumer systems, and JmsProducer for producer systems.

指定将用于每个系统的客户端名称前缀。默认情况下,它将使用JmsConsumer作为消费者系统,以及生产者系统的JmsProducer。

sysTest.numClients

sysTest.numClients

1

1

Specifies the number of JMS Clients to start.

指定要启动的JMS客户机的数量。

sysTest.totalDests

sysTest.totalDests

1

1

Specifies the total number of destinations to use for the whole system test.

指定用于整个系统测试的目的地的总数。

sysTest.destDistro

sysTest.destDistro

all

所有

Specifies how to distribute the destinations to the clients. Available values are (Invalid value will result to using the default value 'all')1:

指定如何将目的地分发给客户端。可用值(无效值将导致使用默认值“all”)1:

  • 'all' - All clients will send/receive to all destinations. i.e. if there are 2 producers and 5 destinations, each producer will send a message to each individual destination.
  • “所有”-所有客户将发送/接收到所有目的地。例如,如果有2个生产者和5个目的地,每个生产者都会向每个目的地发送一条消息。
  • 'equal' - Clients will equally divide the destinations among themselves. i.e. if there are 2 producers and 5 destinations, each producer will send messages to 2 destinations. The fifth destination will not be used.
  • “平等”——客户将平等地将目的地分成两部分。例如,如果有2个生产者和5个目的地,每个生产者将向两个目的地发送消息。第五个目的地将不会被使用。
  • 'divide' - Clients will divide the destinations among themselves regardless of equality. i.e. if there are 2 producers and 5 destinations, producer 1 will send to 3 destinations, while producer 2 will send to 2 destinations.
  • “划分”——客户将会在自己的目的地之间进行划分,而不考虑是否平等。即,如果有2个生产者和5个目的地,生产者1将发送到3个目的地,而生产者2将发送到2个目的地。

sysTest.reportDir

sysTest.reportDir

./

。/

The directory where the sampler report will be saved.

将保存采样器报告的目录。

sysTest.reportName

sysTest.reportName

null

The default filename the sampler report will be saved us. There is usually no need to set this setting as the default value will create either JmsProducer_numClients#numDests#<Dest Distro>.xml and JmsConsumer_numClients#_numDests#_<Dest Distro>.xml, where # represents the number of clients and destinations set for that system, and <Dest Distro> specifies the destination distribution for the system.

默认的文件名,采样器报告将被保存。通常不需要设置这个设置,因为默认值将创建JmsProducer_numClients#号 <最大的发行版> 。xml和JmsConsumer_numClients # _numDests # _ <桌子发行版> 。其中#表示为该系统设置的客户端和目的地的数量,并且 <最大的发行版> 指定系统的目标分布。

sysTest.reportType

sysTest.reportType

xml

xml

Specifies the manner of generating the performance report. Available values are:

指定生成性能报告的方式。可用值:

  • 'xml' - Write the performance report into an xml file. Specified by reportDirectory and reportName. A verbose summary will also be displayed at the end of the test.
  • “xml”——将性能报告写入一个xml文件中。由reportDirectory和reportName指定。在测试结束时也会显示详细的摘要。
  • 'verbose' - All information will be written to the standard output, which includes settings, sampler data, and performance summary.
  • “详细”-所有信息将被写入标准输出,包括设置、采样数据和性能总结。

sysTest.samplers

sysTest.samplers

tp,cpu

tp、cpu

Specifies the samplers that will be started. To use enable more than one sampler, separate the values by commas without spaces. Available values are:

指定将启动的采样器。使用启用多个采样器,用逗号分隔值,不使用空格。可用值:

  • 'tp' - Throughput sampler
  • “tp”——吞吐量取样器
  • 'cpu' - CPU Usage sampler
  • “cpu”- cpu使用采样器。

sysTest.spiClass

sysTest.spiClass

org.apache.activemq.tool.spi.ActiveMQClassLoaderSPI

org.apache.activemq.tool.spi.ActiveMQClassLoaderSPI

The service provider interface class that allows the client to create a generic connection factory. Current available SPI classes include:

服务提供者接口类,允许客户端创建通用连接工厂。现有的SPI类包括:

  1. 'org.apache.activemq.tool.ActiveMQPojoSPI'
  2. “org.apache.activemq.tool.ActiveMQPojoSPI”
  3. 'org.apache.activemq.tool.ActiveMQClassLoaderSPI'
  4. “org.apache.activemq.tool.ActiveMQClassLoaderSPI”

1 Note: If the number of destinations is less than the number of clients and the distribution type is either 'equal' or 'divide', each client will send/receive from only one destination, distributing the destinations among the clients. i.e. if there are 5 producers and 2 destinations, 3 producers will send to destination 1, and 2 producers will send to destination 2. Also, a consumer can only receive from a single destination, unless composite destination is supported and specified.

1注:如果目的地的数量少于客户数量,且分布类型为“相等”或“分”,则每个客户端将只从一个目的地发送/接收,并将目的地分配给客户端。即如果有5个生产者和2个目的地,3个生产者将发送到目的地1,2个生产者将发送到目的地2。此外,使用者只能从单一目的地接收,除非支持和指定复合目的地。

Configuration for running a JMS Producer

用于运行JMS生成器的配置。

Configuration Key

配置关键

Default Value

默认值

Description

描述

producer.sessTransacted

producer.sessTransacted

false

Specifies if the session created will be transacted or not. See the JMS Specifications for more details.

指定所创建的会话是否被处理。有关更多详细信息,请参见JMS规范。

producer.sessAckMode

producer.sessAckMode

autoAck

autoAck

Specified the acknowledge mode of the session. See the JMS Specifications for more details. Available values are:

指定会话的确认模式。有关更多详细信息,请参见JMS规范。可用值:

  1. 'autoAck' - Session.AUTO_ACKNOWLEDGE
  2. “autoAck”——Session.AUTO_ACKNOWLEDGE
  3. 'clientAck' - Session.CLIENT_ACKNOWLEDGE
  4. “clientAck”——Session.CLIENT_ACKNOWLEDGE
  5. 'dupsAck' - Session.DUPS_OK_ACKNOWLEDGE
  6. “dupsAck”——Session.DUPS_OK_ACKNOWLEDGE
  7. 'transacted' - Session.TRANSACTED
  8. “交易”——Session.TRANSACTED

producer.commitAfterXMsgs

producer.commitAfterXMsgs

1

1

Commit transaction after the specified amount of messages. Only used in conjunction with a transacted JMS Session (producer.sessTransacted=true and producer.sessAckMode=transacted)

在指定的消息量之后提交事务。仅与transact JMS会话(生成器)一起使用。sessTransacted = true和producer.sessAckMode =交易)

producer.destName

producer.destName

TEST.FOO

TEST.FOO

The prefix of the destination name to use. To specify a queue, prefix the destination name with 'queue://', for topics, prefix the destination with 'topic://'. If no prefix is specified, a topic will be created.

要使用的目标名称的前缀。要指定一个队列,请在目标名称前面加上“queue://”,用于主题,前缀为“topic://”。如果没有指定前缀,将创建一个主题。

producer.destComposite

producer.destComposite

false

If there are more than one destination, and destComposite=true, the destinations will be merged into one. This assumes that the provider supports composite destinations.

如果有多个目的地,并且destComposite=true,那么目的地将合并为一个。这假设提供者支持复合目的地。

producer.deliveryMode

producer.deliveryMode

nonpersistent

非持久的

The message delivery mode that will be used for each producer. Available values are:

将用于每个生产者的消息传递模式。可用值:

  1. 'nonpersistent' - use non-persistent delivery mode. javax.jms.DeliveryMode.NON_PERSISTENT.
  2. “非持久性”——使用非持久性交付模式。javax.jms.DeliveryMode.NON_PERSISTENT。
  3. 'persistent' - use persistent delivery mode. javax.jms.DeliveryMode.PERSISTENT.
  4. “持久”-使用持续交付模式。javax.jms.DeliveryMode.PERSISTENT。

producer.messageSize

producer.messageSize

1024 bytes

1024个字节

The size of each text message to send.

发送的每个文本消息的大小。

producer.msgFileName

producer.msgFileName

null

If you want to send a fixed message from a particular file. The file needs to be a text file. The entire content of the file will be sent as message body. Specifying a file containing the message to be sent makes the producer ignore the property producer.messageSize. Use relative or full path. Example: -Dproducer.msgFileName=../message.xml

如果您想从特定的文件发送一个固定的消息。文件需要是一个文本文件。文件的整个内容将作为消息体发送。指定包含要发送的消息的文件会使生产者忽略属性产品。messagesize。使用相对或完整路径。例如:-Dproducer.msgFileName = . . / message.xml

producer.createNewMsg

producer.createNewMsg

false

If true, each send will create a new JMS Message with the specified message size with incrementing text messages (i.e. Text Message 1, Text Message 2, ...). If false, only one message will be created before the send loop, and this message will be sent over and over again.

如果是true,每个send将创建一个带有指定消息大小的新JMS消息,并增加文本消息(即文本消息1,文本消息2,…)。如果错误,在发送循环之前只会创建一个消息,并且此消息将一次又一次地发送。

producer.sendDelay

producer.sendDelay

0 ms

0女士

Pause producer for sendDelay milliseconds after each message (allows producer throttling).

在每个消息(允许生产者节流)后,暂停生产者的sendDelay毫秒。

producer.sendType

producer.sendType

time

时间

Send either time-based or message-count-based. Available values are:

发送基于时间的或基于消息的。可用值:

  1. 'time' - keep sending messages until a specific interval of time elapses.
  2. “时间”——持续发送消息,直到特定的时间间隔结束。
  3. 'count' - keep sending messages until N messages has been sent.
  4. “计数”——在发送N条消息之前一直发送消息。

producer.sendCount

producer.sendCount

1000000 msgs
(1 million)

1000000公司(100万)

If sendType=count, send this number of messages.

如果sendType=count,则发送此数量的消息。

producer.sendDuration

producer.sendDuration

300000 ms
(5 mins)

300000 ms(5分钟)

If sendType=time, send messages for this number of milliseconds.

如果sendType=时间,发送消息的时间为毫秒。

producer.header

producer.header

none

没有一个

Specify message headers to be set on all messages. Headers use name=value syntax and can be separated using ':'. More than one header can be set on a single producer.header line, e.g. producer.header="JMSType=car:MyHeader=MyValue" (no spaces). Only one producer.header line is allowed!

指定要在所有消息上设置的消息头。header使用名称=值语法,可以使用“:”分隔。可以在单个生成器上设置多个报头。标题行,如生产商。头= " JMSType =汽车:到了头= MyValue”(没有空格)。只有一个制片人。标题行是允许的!

Configuration for running a JMS Consumer

用于运行JMS用户的配置。

Configuration Key

配置关键

Default Value

默认值

Description

描述

consumer.sessTransacted

consumer.sessTransacted

false

Specifies if the session created will be transacted or not. See the JMS Specifications for more details.

指定所创建的会话是否被处理。有关更多详细信息,请参见JMS规范。

consumer.sessAckMode

consumer.sessAckMode

autoAck

autoAck

Specified the acknowledge mode of the session. See the JMS Specifications for more details. Available values are:

指定会话的确认模式。有关更多详细信息,请参见JMS规范。可用值:

  1. 'autoAck' - Session.AUTO_ACKNOWLEDGE
  2. “autoAck”——Session.AUTO_ACKNOWLEDGE
  3. 'clientAck' - Session.CLIENT_ACKNOWLEDGE
  4. “clientAck”——Session.CLIENT_ACKNOWLEDGE
  5. 'dupsAck' - Session.DUPS_OK_ACKNOWLEDGE
  6. “dupsAck”——Session.DUPS_OK_ACKNOWLEDGE
  7. 'transacted' - Session.TRANSACTED
  8. “交易”——Session.TRANSACTED

consumer.commitAfterXMsgs

consumer.commitAfterXMsgs

1

1

Commit transaction after the specified amount of messages. Only used in conjunction with a transacted JMS Session (consumer.sessTransacted=true and consumer.sessAckMode=transacted)

在指定的消息量之后提交事务。仅与transact JMS会话(消费者)一起使用。sessTransacted = true和consumer.sessAckMode =交易)

consumer.destName

consumer.destName

TEST.FOO

TEST.FOO

The prefix of the destination name to use. To specify a queue, prefix the destination name with 'queue://', for topics, prefix the destination with 'topic://'. If no prefix is specified, a topic will be created.

要使用的目标名称的前缀。要指定一个队列,请在目标名称前面加上“queue://”,用于主题,前缀为“topic://”。如果没有指定前缀,将创建一个主题。

consumer.destComposite

consumer.destComposite

false

If there are more than one destination, and destComposite=true, the destinations will be merged into one. This assumes that the provider supports composite destinations.

如果有多个目的地,并且destComposite=true,那么目的地将合并为一个。这假设提供者支持复合目的地。

consumer.durable

consumer.durable

false

If true, create a durable subscriber, otherwise create a message consumer. See the JMS Specifications for more details.

如果正确,创建持久订户,否则创建消息使用者。有关更多详细信息,请参见JMS规范。

consumer.asyncRecv

consumer.asyncRecv

true

真正的

If true, asynchronously receive messages using the onMessage() method, otherwise use the receive() method.

如果是true,则使用onMessage()方法异步接收消息,否则使用receive()方法。

consumer.recvDelay

consumer.recvDelay

0 ms

0女士

Pause consumer for recvDelay milliseconds with each message (allows consumer throttling).

在每条消息(允许用户节流)的情况下,暂停使用者的recvDelay毫秒。

consumer.recvType

consumer.recvType

time

时间

Receive either time-based or message-count-based. Available values are:

接收基于时间的或基于消息的。可用值:

  1. 'time' - keep receiving messages until a specific time interval has elapsed.
  2. “时间”——持续接收消息,直到特定的时间间隔过去。
  3. 'count' - keep receiving until N messages has been received.
  4. “计数”——一直接收到收到N条消息。

consumer.recvCount

consumer.recvCount

1000000 msgs
(1 million)

1000000公司(100万)

If recvType=count, receive this much messages.

如果recvType=count,则接收此消息。

consumer.recvDuration

consumer.recvDuration

300000 ms
(5 mins)

300000 ms(5分钟)

If recvType=time, receive messages for this specific time duration.

如果recvType=时间,则在此特定时间内接收消息。

consumer.messageSelector

consumer.messageSelector

none

没有一个

Specify message selector for all consumers. E.g. consumer.messageSelector="MyHeader = 'MyValue' AND JMSType = 'car'"

为所有用户指定消息选择器。如消费者。messageSelector="MyHeader = 'MyValue'和JMSType = 'car'"

Note: If you have more than one consumer receiving from multiple destinations, it is a good idea to change the sysTest.destDistro to 'equal', since by default it uses 'all' and a consumer can only receive from a single destination, hence all consumers will receive from the first destination in the list only.

注意:如果您有多个消费者接收来自多个目的地,这是一个好主意改变sysTest.destDistro‘平等’,因为默认情况下它使用“所有”,消费者只能接收从一个目的地,因此所有消费者将获得从列表中的第一个目的地。

Configuration for SPI Connection Factory: org.apache.activemq.tool.spi.ActiveMQPojoSPI

配置SPI连接工厂:org. apache.activemq.tool.activemqpojospi。

Description: This provides details in configuring the JMS Connection Factory created by ActiveMQPojoSPI. Default values are based from the default values of the service provider org.apache.activemq.ActiveMQConnectionFactory.

描述:这提供了配置ActiveMQPojoSPI创建的JMS连接工厂的详细信息。默认值基于服务提供者org.apache.activemq.ActiveMQConnectionFactory的默认值。

Configuration Key

配置关键

Default Value

默认值

Description

描述

factory.brokerURL

factory.brokerURL

tcp://localhost:61616

tcp:/ / localhost:61616

The url of the broker the client will connect to.

客户端将连接到的代理的url。

factory.userName

factory.userName

null

Username on the connection to use.

在连接上使用的用户名。

factory.password

factory.password

null

Password on the connection to use.

连接使用的密码。

factory.clientID

factory.clientID

null

Client ID the connection will use. If none is specified, it will be automatically generated.

客户端ID连接将使用。如果没有指定,就会自动生成。

factory.asyncSend

factory.asyncSend

false

If true, asynchronously send messages.

如果是真,异步发送消息。

factory.asyncDispatch

factory.asyncDispatch

false

If true, asynchronously dispatch messages.

如果为真,则异步分派消息。

factory.asyncSession

factory.asyncSession

true

真正的

If true, session will dispatch messages asynchronously.

如果是true,会话将异步分派消息。

factory.closeTimeout

factory.closeTimeout

15000 ms

15000毫秒

factory.copyMsgOnSend

factory.copyMsgOnSend

true

真正的

If true, creates a copy of the message to be sent.

如果为真,则创建要发送的消息的副本。

factory.disableTimestamp

factory.disableTimestamp

false

If true, disable the setting of the JMSTimestamp.

如果正确,禁用JMSTimestamp的设置。

factory.deferObjSerial

factory.deferObjSerial

false

If true, defer the serialization of message objects.

如果是正确的,则延迟消息对象的序列化。

factory.optimAck

factory.optimAck

true

真正的

If true, optimizes the acknowledgement of messages.

如果是正确的,则优化消息的确认。

factory.optimDispatch

factory.optimDispatch

true

真正的

If true, optimizes the dispatching of messages.

如果是正确的,则优化消息的发送。

factory.prefetchQueue

factory.prefetchQueue

1000 messages

1000条信息

Number of messages a queue consumer will cache in RAM before processing it.

在处理之前,队列使用者将在RAM中缓存的消息数量。

factory.prefetchTopic

factory.prefetchTopic

32766 messages

32766条信息

Number of messages a topic consumer will cache in RAM before processing it.

一个主题消费者在处理它之前在RAM中缓存的消息数量。

factory.useCompression

factory.useCompression

false

If true, compress message data.

如果是,则压缩消息数据。

factory.useRetroactive

factory.useRetroactive

false

If true, make consumers retroactive.

如果是真的,那就让消费者进行追溯。

Configuration for SPI Connection Factory: org.apache.activemq.tool.spi.ActiveMQClassLoaderSPI

配置SPI连接工厂:org. apache.activemq.tool.activemqclassloaderspi。

Description: This provides details in configuring the JMS Connection Factory created by ActiveMQClassLoaderSPI. Default values are based from the default values of the service provider org.apache.activemq.ActiveMQConnectionFactory.

描述:这提供了配置ActiveMQClassLoaderSPI创建的JMS连接工厂的详细信息。默认值基于服务提供者org.apache.activemq.ActiveMQConnectionFactory的默认值。

ActiveMQClassLoaderSPI loads from the classpath "org.apache.activemq.ActiveMQConnectionFactory" and configures it using reflection. Configuration is generally based on the API of the class loaded. General format is factory.YYY or factory.XXX.YYY, where the last variable (YYY) is the property to set and everything in between is the getter of the class to use to set (YYY). For example:

ActiveMQClassLoaderSPI负载来自类路径“org.apache.activemq。ActiveMQConnectionFactory“并使用反射配置它。配置通常基于装入的类的API。一般格式是工厂。多或factory.XXX。YYY,最后一个变量(YYY)是设置的属性,中间的所有内容都是类的getter,用于设置(YYY)。例如:

  1. To set the value for asyncSend in ActiveMQConnectionFactory, use:
    factory.useAsyncSend=true, which is equivalent to calling factory.setUseAsyncSend(true)
  2. 要设置ActiveMQConnectionFactory中asyncSend的值,请使用:factory。useAsyncSend=true,相当于调用factory.setUseAsyncSend(true)
  1. To set the queue prefetch for ActiveMQConnectionFactory, use:
    factory.prefetchPolicy.queuePrefetch=1, which is equivalent to calling factory.getPrefetchPolicy().setQueuePrefetch(1)
  2. 要设置ActiveMQConnectionFactory的队列预取,可以使用:factory.prefetchPolicy。queuePrefetch=1,相当于调用factor. getprefetchpolicy ().setQueuePrefetch(1)

It should be noted that the loaded class should implement the appropriate getter and setter methods. Nested objects should also be properly instantiated. For more information on configuring this SPI, refer to the specific provider API manual.

应该注意的是,加载的类应该实现适当的getter和setter方法。还应该适当地实例化嵌套对象。有关配置此SPI的更多信息,请参阅特定的提供者API手册。

As of ActiveMQ 4.0.1, these are the available fields and default values:

在ActiveMQ 4.0.1中,这些是可用字段和默认值:

Configuration Key

配置关键

Default Value

默认值

factory.prefetchPolicy.optimizeDurableTopicPrefetch

factory.prefetchPolicy.optimizeDurableTopicPrefetch

1000

1000年

factory.prefetchPolicy.durableTopicPrefetch

factory.prefetchPolicy.durableTopicPrefetch

100

One hundred.

factory.password

factory.password

null

factory.prefetchPolicy.queueBrowserPrefetch

factory.prefetchPolicy.queueBrowserPrefetch

500

500年

factory.useCompression

factory.useCompression

false

factory.disableTimeStampsByDefault

factory.disableTimeStampsByDefault

false

factory.optimizedMessageDispatch

factory.optimizedMessageDispatch

true

真正的

factory.useRetroactiveConsumer

factory.useRetroactiveConsumer

false

factory.alwaysSessionAsync

factory.alwaysSessionAsync

true

真正的

factory.copyMessageOnSend

factory.copyMessageOnSend

true

真正的

factory.prefetchPolicy.topicPrefetch

factory.prefetchPolicy.topicPrefetch

32766

32766年

factory.useAsyncSend

factory.useAsyncSend

false

factory.redeliveryPolicy.backOffMultiplier

factory.redeliveryPolicy.backOffMultiplier

5

5

factory.prefetchPolicy.inputStreamPrefetch

factory.prefetchPolicy.inputStreamPrefetch

100

One hundred.

factory.closeTimeout

factory.closeTimeout

15000

15000年

factory.userName

factory.userName

null

factory.optimizeAcknowledge

factory.optimizeAcknowledge

false

factory.clientID

factory.clientID

null

factory.objectMessageSerializationDefered

factory.objectMessageSerializationDefered

false

factory.asyncDispatch

factory.asyncDispatch

false

factory.redeliveryPolicy.initialRedeliveryDelay

factory.redeliveryPolicy.initialRedeliveryDelay

1000

1000年

factory.prefetchPolicy.queuePrefetch

factory.prefetchPolicy.queuePrefetch

1000

1000年

factory.redeliveryPolicy.maximumRedeliveries

factory.redeliveryPolicy.maximumRedeliveries

5

5

factory.redeliveryPolicy.useCollisionAvoidance

factory.redeliveryPolicy.useCollisionAvoidance

false

factory.prefetchPolicy.maximumPendingMessageLimit

factory.prefetchPolicy.maximumPendingMessageLimit

0

0

factory.redeliveryPolicy.useExponentialBackOff

factory.redeliveryPolicy.useExponentialBackOff

false

Configuration for samplers

配置采样

There are two samplers built into the perfomance test tool. Both are configured with the same configuration keys, only prefixed with different sampler names.

在性能测试工具中内置了两个采样器。这两种配置都配置相同的配置键,仅使用不同的采样器名称进行前缀。

Sampler samplerName
Throughput Sampler tpSampler
CPU Sampler cpuSampler

For example, it is possible to configure the two samplers differently for a single test run, using the prefixes above as follows:

例如,可以使用上面的前缀将两个samplers配置为不同的单个测试运行:

mvn activemq-perf:producer -DtpSampler.duration=10000 -DcpuSampler.duration=15000

By default, both samplers are used within a test run. This however, can be overridden through the use of the sysTest.samplers property.

默认情况下,两个采样器都在测试运行中使用。但是,可以通过使用该系统来覆盖它。取样器属性。

Before ActiveMQ 5.11

在ActiveMQ 5.11之前

Sampler configurations are not tied in to the test run, so it is possible for the sampler to run for longer than the actual test itself. For short run durations, the sampler may not even have ramped up before the test completes.

采样器的配置与测试运行没有关联,所以采样器运行的时间可能比实际测试本身要长。对于短时间运行的时间,在测试完成之前,采样器甚至可能没有增加。

Configuration Key

配置关键

Default Value

默认值

Description

描述

samplerName.duration

samplerName.duration

300000

300000年

The total duration (in ms) the sampler will run, including ramp up and ramp down time.

总持续时间(在ms中)采样器将运行,包括上升和下降时间。

samplerName.rampUpTime

samplerName.rampUpTime

30000

30000年

The ramp up time of the sampler, sampling will only start after the ramp up time.

采样器的增加时间,采样只在增加时间后开始。

samplerName.rampDownTime

samplerName.rampDownTime

30000

30000年

The ramp down time of the sampler, sampling will stop when the sampler has executed for (duration - rampUpTime - rampDownTime) ms.

采样器的下降时间,采样将停止当采样器执行(持续时间- rampUpTime -横置时间)ms。

samplerName.interval

samplerName.interval

1000

1000年

The interval (in ms), the sampler will sample for data.

间隔(在ms中),采样器将采样数据。

From ActiveMQ 5.11

从ActiveMQ 5.11

Sampler run duration is tied directly to the behavior of the client (producer/consumer). Due to the non-deterministic nature of count-based tests (where consumer.recvType or producer.sendType are set to count), duration, ramp up and ramp down times are ignored; the samplers are shut down when the client completes.

采样器运行持续时间与客户(生产者/消费者)的行为直接相关。由于基于计数的测试的非确定性性质(消费者)。recvType或生产者。sendType设置为count)、持续时间、渐变和渐变时间被忽略;当客户端完成时,samplers将被关闭。

Configuration Key

配置关键

Default Value

默认值

Description

描述

samplerName.duration

samplerName.duration

For time-based tests, matches the consumer or producer duration.

对于基于时间的测试,匹配消费者或生产者的持续时间。

Ignored for count-based tests.

基于忽略对点测试。

The total duration (in ms) the sampler will run, including ramp up and ramp down time.

总持续时间(在ms中)采样器将运行,包括上升和下降时间。

samplerName.rampUpTime

samplerName.rampUpTime

null; defers to rampUpPercent.

零;rampUpPercent推迟。

Ignored for count-based tests.

基于忽略对点测试。

The ramp up time of the sampler, sampling will only start after the ramp up time.

采样器的增加时间,采样只在增加时间后开始。

samplerName.rampDownTime

samplerName.rampDownTime

null; defers to rampDownPercent.

零;rampDownPercent推迟。

Ignored for count-based tests.

基于忽略对点测试。

The ramp down time of the sampler, sampling will stop when the sampler has executed for (duration - rampUpTime - rampDownTime) ms.

采样器的下降时间,采样将停止当采样器执行(持续时间- rampUpTime -横置时间)ms。

samplerName.rampUpPercent

0

0

Ignored for count-based tests.

基于忽略对点测试。

The percentage of the overall run duration that the sampler should use to ramp up (0-100). Overridden by rampUpTime.
samplerName.rampDownPercent

0

0

Ignored for count-based tests.

基于忽略对点测试。

The percentage of the overall run duration that the sampler should use to ramp down (0-99). Overridden by rampDownTime.

samplerName.interval

samplerName.interval

1000

1000年

The interval (in ms), the sampler will sample for data.

间隔(在ms中),采样器将采样数据。

The time taken to ramp up and ramp down, whether defined through milliseconds or as a percentage cannot exceed the total duration.

时间越长越好,无论是通过毫秒还是以百分比来定义,都不能超过总持续时间。

© 2004-2011 The Apache Software Foundation.
Apache ActiveMQ, ActiveMQ, Apache, the Apache feather logo, and the Apache ActiveMQ project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
Graphic Design By Hiram