问题 在非GUI模式下运行JMeter时配置结果文件数据


我目前正在通过以下方式在非GUI模式下运行JMeter:

"apache-jmeter/bin/jmeter -n -t $testPlan.jmx -l results.jtl"

测试完成后,results.jtl文件包含如下内容:

1379545163610,186,HTTP Request,403,Forbidden,Service 1-30,text,false,239,186

看来它正在使用默认配置来输出什么,但是如果我只想看到每行的延迟而不是这个大的csv值呢?我知道当你在GUI模式下使用JMeter时,以及当你添加一个新的监听器,例如“查看表中的结果”时,你可以配置应该写入生成的jtl文件的内容,例如响应代码,延迟,线程名称,等等

但是,我只想要延迟数据。如何通过此命令行而不是通过GUI配置?

谢谢!


10611
2017-09-18 23:03


起源



答案:


在jmeter.properties中查看以下一组属性。

#---------------------------------------------------------------------------
# Results file configuration
#---------------------------------------------------------------------------

# This section helps determine how result data will be saved.
# The commented out values are the defaults.

# legitimate values: xml, csv, db.  Only xml and csv are currently supported.
#jmeter.save.saveservice.output_format=csv

...
...
# Only applies to CSV format files:
jmeter.save.saveservice.print_field_names=true

print_field_names默认为false。将其设置为true以确定哪个列是什么?

timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,bytes,Latency
1379564790444,652,jp@gc - Dummy Sampler,200,OK,Thread Group 1-1,text,true,87,78
1379564791099,1,Debug Sampler,200,OK,Thread Group 1-1,text,true,1175,0

顺便说一句,大值是时代的时间戳,如果你的意思是第一场 big value


12
2017-09-19 04:30



谢谢你的帮助,Manish! - HiChews123


答案:


在jmeter.properties中查看以下一组属性。

#---------------------------------------------------------------------------
# Results file configuration
#---------------------------------------------------------------------------

# This section helps determine how result data will be saved.
# The commented out values are the defaults.

# legitimate values: xml, csv, db.  Only xml and csv are currently supported.
#jmeter.save.saveservice.output_format=csv

...
...
# Only applies to CSV format files:
jmeter.save.saveservice.print_field_names=true

print_field_names默认为false。将其设置为true以确定哪个列是什么?

timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,bytes,Latency
1379564790444,652,jp@gc - Dummy Sampler,200,OK,Thread Group 1-1,text,true,87,78
1379564791099,1,Debug Sampler,200,OK,Thread Group 1-1,text,true,1175,0

顺便说一句,大值是时代的时间戳,如果你的意思是第一场 big value


12
2017-09-19 04:30



谢谢你的帮助,Manish! - HiChews123


默认情况下,JMeter不会将任何摘要结果保存到文件。您必须保存为JTL并稍后在摘要侦听器中查看它或使用摘要侦听器运行。我宁愿建议第一个选项,因为第二个选项将是JMeter的开销。 此外,我还阅读了一篇文章,了解在非GUI模式下运行时可以在控制台上记录的摘要数量。请阅读 - http://developer.amd.com/community/blog/using-apache-jmeter-in-non-gui-mode/


1
2017-09-20 12:23