I'm currently running JMeter in Non-GUI mode via:
我目前正在运行JMeter的非gui模式,通过:
"apache-jmeter/bin/jmeter -n -t $testPlan.jmx -l results.jtl"
When the tests finish running, the results.jtl file contains something like this:
当测试结束运行时,结果。jtl文件包含如下内容:
1379545163610,186,HTTP Request,403,Forbidden,Service 1-30,text,false,239,186
It appears that it's using a default configuration for what should be outputted, but what if I'm interested in seeing only the latencies per line instead this big csv value? I know that when you use JMeter in GUI mode, and when you add a new listener such as "View Results In Table", you can configure what exactly should be written to the resulting jtl file such as response code, latency, thread name, etc.
它似乎使用了默认的配置来输出,但是如果我只想看到每行的延迟而不是这个大的csv值呢?我知道,当您在GUI模式中使用JMeter时,以及当您添加一个新的侦听器(如“视图结果表”)时,您可以配置应该将哪些内容写入到结果的jtl文件中,例如响应代码、延迟、线程名等。
I just want the latency data, however. How can configure this through this command line instead of through the GUI?
不过,我只想要延迟数据。如何通过这个命令行而不是GUI配置它?
Thanks!
谢谢!
2 个解决方案
#1
12
Check out following set of properties in jmeter.properties.
查看以下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 is by default false. Set it to true to figure out what column is what?
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
By the way that big value is timestamp in epoch, if you meant 1st field by big value
.
顺便说一下,大值是时代的时间戳,如果你指的是第一个字段的大值。
#2
1
By default JMeter does not save any summary results to file. Either you have to save as JTL and view it in the summary listeners later or run with the summary listeners. I would rather suggest the first option, as the second will be a overhead for the JMeter. Also i have read an post on how few summary can be logged on console while running in non-GUI mode. Please read - http://developer.amd.com/community/blog/using-apache-jmeter-in-non-gui-mode/
默认情况下,JMeter不会将任何汇总结果保存到文件中。要么保存为JTL并在随后的摘要侦听器中查看它,要么使用摘要侦听器运行。我宁愿建议第一个选项,因为第二个选项是JMeter的开销。我还读了一篇关于在非gui模式下运行时,控制台可以登录的摘要的文章。请阅读——http://developer.amd.com/community/blog/using-apache-jmeter-in-non-gui-mode/
#1
12
Check out following set of properties in jmeter.properties.
查看以下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 is by default false. Set it to true to figure out what column is what?
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
By the way that big value is timestamp in epoch, if you meant 1st field by big value
.
顺便说一下,大值是时代的时间戳,如果你指的是第一个字段的大值。
#2
1
By default JMeter does not save any summary results to file. Either you have to save as JTL and view it in the summary listeners later or run with the summary listeners. I would rather suggest the first option, as the second will be a overhead for the JMeter. Also i have read an post on how few summary can be logged on console while running in non-GUI mode. Please read - http://developer.amd.com/community/blog/using-apache-jmeter-in-non-gui-mode/
默认情况下,JMeter不会将任何汇总结果保存到文件中。要么保存为JTL并在随后的摘要侦听器中查看它,要么使用摘要侦听器运行。我宁愿建议第一个选项,因为第二个选项是JMeter的开销。我还读了一篇关于在非gui模式下运行时,控制台可以登录的摘要的文章。请阅读——http://developer.amd.com/community/blog/using-apache-jmeter-in-non-gui-mode/