0

我将使用 Jmeter 对 ActiveMQ 进行基准测试。根据这个文档,我只需要添加activemq-all.jarlib/目录:

$ ll /usr/share/jmeter/lib/
total 12812
drwxr-xr-x 3 root root    4096 Oct 12 16:55 ./
drwxr-xr-x 6 root root    4096 Oct 12 14:11 ../
-rw-r--r-- 1 root root 3800187 Aug 14  2010 activemq-all-5.8.0.jar
-rw-r--r-- 1 root root   29071 Sep 26  2010 bshclient.jar
drwxr-xr-x 2 root root    4096 Oct 12 14:11 ext/
-rw-r--r-- 1 root root  116075 Sep 26  2010 jorphan.jar

然后启动Jmeter:

$ jmeter
[warning] /usr/bin/jmeter: Unable to locate commons-net in /usr/share/java
[warning] /usr/bin/jmeter: Unable to locate geronimo-activation-1.1-spec in /usr/share/java
[warning] /usr/bin/jmeter: Unable to locate geronimo-javamail-1.4-provider in /usr/share/java
[warning] /usr/bin/jmeter: Unable to locate jboss-j2ee in /usr/share/java
[warning] /usr/bin/jmeter: No JAVA_CMD set for run_java, falling back to JAVA_CMD = java
java.lang.Throwable: Could not access /usr/share/jmeter/lib/junit
    at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:96)
log_file=jmeter.log java.io.FileNotFoundException: jmeter.log (Permission denied)
[log_file-> System.out]
2013/10/12 16:18:58 INFO  - jmeter.util.JMeterUtils: Setting Locale to en_US 
2013/10/12 16:18:58 INFO  - jmeter.JMeter: Copyright (c) 1998-2009 The Apache Software Foundation 
2013/10/12 16:18:58 INFO  - jmeter.JMeter: Version 2.3.4 
2013/10/12 16:18:58 INFO  - jmeter.JMeter: java.version=1.6.0_24 
2013/10/12 16:18:58 INFO  - jmeter.JMeter: java.vm.name=OpenJDK 64-Bit Server VM 
2013/10/12 16:18:58 INFO  - jmeter.JMeter: os.name=Linux 
2013/10/12 16:18:58 INFO  - jmeter.JMeter: os.arch=amd64 
2013/10/12 16:18:58 INFO  - jmeter.JMeter: os.version=3.2.0-32-generic 
2013/10/12 16:18:58 INFO  - jmeter.JMeter: file.encoding=UTF-8 
2013/10/12 16:18:58 INFO  - jmeter.JMeter: Default Locale=English (United States) 
2013/10/12 16:18:58 INFO  - jmeter.JMeter: JMeter  Locale=English (United States) 
2013/10/12 16:18:58 INFO  - jmeter.JMeter: JMeterHome=/usr/share/jmeter 
2013/10/12 16:18:58 INFO  - jmeter.JMeter: user.dir  =/usr/share/jmeter/lib 
2013/10/12 16:18:58 INFO  - jmeter.JMeter: PWD       =/usr/share/jmeter/lib 
2013/10/12 16:18:58 INFO  - jmeter.JMeter: IP: 127.0.1.1 Name: ubuntu-Vostro-3560 FullName: ubuntu-Vostro-3560 
2013/10/12 16:18:58 INFO  - jmeter.JMeter: Loaded icon properties from org/apache/jmeter/images/icon.properties 
2013/10/12 16:18:59 INFO  - jmeter.util.BSFTestElement: Registering JMeter version of JavaScript engine as work-round for BSF-22 
2013/10/12 16:19:00 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: No response parsers defined: text/html only will be scanned for embedded resources 
2013/10/12 16:19:00 INFO  - jmeter.protocol.http.sampler.HTTPSampler: Maximum connection retries = 10 
2013/10/12 16:19:00 INFO  - jmeter.protocol.http.sampler.HTTPSampler: Connection and read timeouts are available on this JVM 
2013/10/12 16:19:00 INFO  - jmeter.samplers.SampleResult: Note: Sample TimeStamps are END times 
2013/10/12 16:19:00 INFO  - jmeter.samplers.SampleResult: sampleresult.default.encoding is set to ISO-8859-1 

但我没有在 Sampler 菜单中看到 JMS 订阅者/发布者:

在此处输入图像描述

我也尝试按照本指南使用旧版本,但它没有用。

我错过了什么?

4

2 回答 2

2

您绝对应该使用更新版本的 JMeter。

当前版本是 2.9,而 2.10 将在几个小时内发布。您的 2.3.4 版本已有 6 年历史,其中包含许多 JMS 测试中的错误,这些错误已在很久以前修复。

至少使用 2.9 并放入 jmeter/lib:

  • activemq-all-5.8.0.jar
于 2013-10-19T14:13:45.900 回答
0

答案是ApacheJMeter_jms.jar。用 搜索apt-file,我发现了这个:

# apt-file search ApacheJMeter_jms.jar
jmeter-jms: /usr/share/jmeter/lib/ext/ApacheJMeter_jms.jar

安装此包后,我可以在 Sampler 菜单中看到 JMS Publisher/Subscriber:

在此处输入图像描述

于 2013-10-12T15:55:01.327 回答