还未发布过话题
  • JMeter 测试配置优化考虑 at 2019年06月27日

    因为最近项目需要大量线程并发操作,也在优化 Jmeter 使用的性能,看到了楼主的文章,非常感谢楼主的分享,后来也查阅了官方文档,对于 Functional mode,官方是不建议使用的,贴了官方的一些说明,可以供后续有需要的同学参考,另外官方文档地址为:https://jmeter.apache.org/usermanual/best-practices.html

    16.7 Reducing resource requirements

    Some suggestions on reducing resource usage.

    Use CLI mode: jmeter -n -t test.jmx -l test.jtl
    Use as few Listeners as possible; if using the -l flag as above they can all be deleted or disabled.
    Don't use "View Results Tree" or "View Results in Table" listeners during the load test, use them only during scripting phase to debug your scripts.
    Rather than using lots of similar samplers, use the same sampler in a loop, and use variables (CSV Data Set) to vary the sample. [The Include Controller does not help here, as it adds all the test elements in the file to the test plan.]
    Don't use functional mode
    Use CSV output rather than XML
    Only save the data that you need
    Use as few Assertions as possible
    Use the most performing scripting language (see JSR223 section)
    If your test needs large amounts of data - particularly if it needs to be randomised - create the test data in a file that can be read with CSV Dataset. This avoids wasting resources at run-time.