Jmeter 在做性能测试的时候,控制台打印出下面的日志:
Don't use GUI mode for load testing, only for Test creation and Test debugging !
For load testing, use NON GUI Mode:
jmeter -n -t [jmx file] -l [results file] -e -o [Path to output folder]
& adapt Java Heap to your test requirements:
Modify HEAP="-Xms512m -Xmx512m" in the JMeter batch file
================================================================================
Uncaught Exception java.lang.OutOfMemoryError: unable to create new native thread. See log file for details.
内存溢出, 下面方法来解决:
in the Jmeter 3.x. there are two steps to solve this problem.
Step 1, to modify the JVM memory in the JMeter batch file
## ==============================================
## Environment variables:
## JVM_ARGS - optional java args, e.g. -Dprop=val
##
## e.g.
## JVM_ARGS="-Xms512m -Xmx512m" jmeter etc.
##
## ==============================================
this is a default value in the jmeter.sh, according to your environment:
JVM_ARGS="-Xms512m -Xmx2048m"
in the jmeter.bat:
set JVM_ARGS=-Xms512m -Xmx2048m
Step 2, to Modify HEAP=”-Xms512m -Xmx512m” in the JMeter batch file:
in the jmeter.sh
HEAP="-Xms512m -Xmx2048m"
in the jmeter.bat:
set HEAP=-Xms512m -Xmx2048m
参照我在stackoverflow上的回答:https://stackoverflow.com/questions/20647651/jmeter-test-failed-with-out-of-memory-error/47990042#47990042
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/164164.html