Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

JMeter non-GUI mode execution test

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

In the actual stress test, it is strongly recommended to use the command line mode, that is, the non-GUI mode, which consumes less press resources and can support greater concurrency.

Note: if necessary, open the command prompt with administrator privileges

Restart the master or slave machine if necessary

Restart jmeter if necessary

Windows can open the command line directly in the script directory: hold down the shift key and select "Open Command window here" with the right mouse button.

The following commands apply under both windows and linux

1. Command interpretation

Jmeter-n-t xxx.jmx-r-l xxx.jtl

N indicates no GUI to run, t indicates the jmx file to be run, r refers to starting all agent remotely, and l refers to the name of the generated file

two。 Command summary

Jmeter-n-t xxx.jmx-l 001.jtl support

Jmeter-n-t xxx.jmx-r-l 001.jtl support

Jmeter-n-t xxx.jmx-Jthreads=10-l 001.jtl-these two, specify the number of threads, but do not specify the number of cycles to support

Jmeter-n-t xxx.jmx-Jthreads=10-r-l 001.jtlr-so it is not supported for a few minutes of running?

Jmeter-n-t xxx.jmx-Jthreads=10-Jloops=100-l 001.jtl support

Jmeter-n-t xxx.jmx-Jthreads=10-Jloops=100-r-l 001.jtl does not support?

Jmeter-n-t xxx.jmx-Jthreads=10-Jloops=100-l 001.jtl-e-o output

Jmeter-n-t xxx.jmx-Jthreads=10-Jloops=100-r-l 001.jtl-e-o output does not support?

Jmeter-g 002.jtl-o output

Doubt: the number of parameterized threads and cycles is not supported in non-GUI mode + distributed mode?

3. Command to use the scene

(1) jmeter-n-t xxx.jmx-l 001.jtl

After running, you can open the jtl file in jmeter to view the result.

(2) parameterize the number of threads and loops on the command line:

Modify jmeter script

Replace the specific number of threads and cycles

Add the-J parameter to the command line

Jmeter-n-t xxx.jmx-Jthreads=10-Jloops=100-l 001.jtl

(3) use commands to automatically generate HTML performance reports and charts of various metrics

Modify jmeter.properties

Jmeter.save.saveservice.output_format=csv

Jmeter.save.saveservice.timestamp_format=yyyy/MM/dd HH:mm:ss

Modify user.properties statistics interval

Jmeter.reportgenerator.overall_granularity=1000

There are two ways to generate HTML reports:

Generate a HTML report at the end of the stress test

Jmeter-n-t xxx.jmx-Jthreads=10-Jloops=100-l 001.jtl-e-o output

Generate HTML reports using existing result files

Jmeter-g 002.jtl-o output

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report