JMeterPluginCMD命令行工具生成png图片和csv统计文件
http://www.cnblogs.com/peak911/p/9239365.html
https://blog.youkuaiyun.com/lluozh2015/article/details/51192058
D:\apache-jmeter-3.1\lib\ext>java -jar CMDRunner.jar --tool Reporter --input-jtl
E:\jmreport_index\cpu.jtl --plugin-type PerfMon --generate-png E:\jmreport_inde
x\cpu.png
报错如下:
WARN 2018-11-01 20:38:42.889 [jmeter.u] (): Exception 'null' occurred when fe
tching String property:'sampleresult.default.encoding', defaulting to:ISO-8859-1
INFO 2018-11-01 20:38:42.980 [kg.apc.j] (): JMeter-Plugins.org v.1.4.0
WARN 2018-11-01 20:38:42.981 [jmeter.u] (): Exception 'null' occurred when fe
tching String property:'jmeterPlugin.prefixPlugins'
INFO 2018-11-01 20:38:42.984 [kg.apc.j] (): Using JMeterPluginsCMD v. 1.4.0
INFO 2018-11-01 20:38:43.016 [jmeter.u] (): Setting Locale to zh_CN
INFO 2018-11-01 20:38:43.106 [kg.apc.j] (): Loading user properties from: D:\
apache-jmeter-3.1\bin\user.properties
INFO 2018-11-01 20:38:43.116 [kg.apc.j] (): Loading system properties from: D
:\apache-jmeter-3.1\bin\system.properties
INFO 2018-11-01 20:38:44.918 [jmeter.s] (): Testplan (JMX) version: 2.2. Test
log (JTL) version: 2.2
INFO 2018-11-01 20:38:44.972 [jmeter.s] (): Using SaveService properties file
encoding UTF-8
INFO 2018-11-01 20:38:45.001 [jmeter.s] (): Using SaveService properties vers
ion 3.1
INFO 2018-11-01 20:38:45.002 [jmeter.s] (): All converter versions present an
d correct
INFO 2018-11-01 20:38:45.081 [jmeter.s] (): Note: Sample TimeStamps are START
times
INFO 2018-11-01 20:38:45.081 [jmeter.s] (): sampleresult.default.encoding is
set to utf-8
INFO 2018-11-01 20:38:45.081 [jmeter.s] (): sampleresult.useNanoTime=true
INFO 2018-11-01 20:38:45.082 [jmeter.s] (): sampleresult.nanoThreadSleep=5000
修改1
jmeter\bin\jmeter.properties
默认编码为:ISO-8859-1
# The encoding to be used if none is provided (default ISO-8859-1)
#sampleresult.default.encoding=ISO-8859-1
根据测试系统修改对应的编码,如为utf-8
则增加编码设置为:
sampleresult.default.encoding=utf-8
修改配置后,要重启jmeter才会生效
修改2
https://blog.youkuaiyun.com/max229max/article/details/8099917
1. 下载插件
2. 解压插件文件, 里面有个JMeterPlugins.jar 把这个文件放到 lib/ext 文件夹下面
3. 打开bin/Jmeter.properties
修改
jmeter.save.saveservice.thread_counts=true
插件相关的设置可以添加到 bin/user.properties
#---------------------------------------------------------------------------
# JMeter Plugins config (http://code.google.com/p/jmeter-plugins)
#---------------------------------------------------------------------------
# Enable or disable the gradient paint for graphs. Value is true or false, default is true.
jmeterPlugin.drawGradient=true
# Globaly disable final zeroing lines in all graphs. Value is true or false, default is false.
jmeterPlugin.neverDrawFinalZeroingLines=true
# Globaly disable current X lines drawing in all concerned graphs. Value is true or false, default is false.
jmeterPlugin.neverDrawCurrentX=true
# Enable or disable graphs Y Axis scaling for better readability. Value is true or false, default is true.
jmeterPlugin.optimizeYAxis=true
# Use relative time in time based graphs. Value is true or false, default is true.
jmeterPlugin.useRelativeTime=true
# Force csv separator character. Default is ',' if decimal separator is '.', ';' otherwise
#jmeterPlugin.csvSeparator=;
# Force csv time format (see http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html)
#jmeterPlugin.csvTimeFormat=HH:mm:ss
# Prefix or not plugin items in JMeter menus. Value is true or false, default is true.
jmeterPlugin.prefixPlugins=true
# Force line width for all line graphs. Default is '1.0'.
jmeterPlugin.graphLineWidth=3
# Draw markers in relevent line graphs. Default is true.
meterPlugin.drawLineMarker=false