Jmeter-Maven-Plugin高级应用:Configuring the jvm that the jmeter process runs in

Posted 梦想空间

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Jmeter-Maven-Plugin高级应用:Configuring the jvm that the jmeter process runs in相关的知识,希望对你有一定的参考价值。

Configuring the jvm that the jmeter process runs in

The JMeter Maven plugin will run the JMeter process in its own JVM. You have full control over this JVM and can set the -Xms and -Xmx as well as any command line arguments you require. We suggest that you set the -Xms and -Xmx to the same values for optimal performance.

+---+
<project>
    [...]
        <build>
            <plugins>
                <plugin>
                    <groupId>com.lazerycode.jmeter</groupId>
                    <artifactId>jmeter-maven-plugin</artifactId>
                    <version>2.0.3</version>
                    <executions>
                        <execution>
                            <id>jmeter-tests</id>
                            <goals>
                                <goal>jmeter</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <jMeterProcessJVMSettings>
                            <xms>1024</xms>
                            <xmx>1024</xmx>
                            <arguments>
                                <argument>-Xprof</argument>
                                <argument>-Xfuture</argument>
                            </arguments>
                        </jMeterProcessJVMSettings>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    [...]
</project>
+---+

SOCKS proxy configuration relies on JVM arguments, socksProxyHost and socksProxyPort:

+---+
<project>
    [...]
        <build>
            <plugins>
                <plugin>
                    <groupId>com.lazerycode.jmeter</groupId>
                    <artifactId>jmeter-maven-plugin</artifactId>
                    <version>2.0.3</version>
                    <executions>
                        <execution>
                            <id>jmeter-tests</id>
                            <goals>
                                <goal>jmeter</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <jMeterProcessJVMSettings>
                            <arguments>
                                <argument>-DsocksProxyHost=localhost</argument>
                                <argument>-DsocksProxyPort=8080</argument>
                            </arguments>
                        </jMeterProcessJVMSettings>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    [...]
</project>
+---+

以上是关于Jmeter-Maven-Plugin高级应用:Configuring the jvm that the jmeter process runs in的主要内容,如果未能解决你的问题,请参考以下文章

Jmeter-Maven-Plugin高级应用:Proxy Configuration

Jmeter-Maven-Plugin高级应用:Remote Server Configuration

Jmeter-Maven-Plugin高级应用:Configuring the jvm that the jmeter process runs in

使用Jmeter-Maven-Plugin搭建基于jmeter+Jenkins的性能测试平台

Jmeter-maven-plugin github 版本插件变更历史

jmeter-maven-plugin