在非GUI模式下运行JMeter时配置结果文件数据 [英] Configuring result file data when running JMeter in non-GUI mode

查看:163
本文介绍了在非GUI模式下运行JMeter时配置结果文件数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm currently running JMeter in Non-GUI mode via:

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

测试完成运行后,results.jtl文件将包含以下内容:

When the tests finish running, the results.jtl file contains something like this:

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

似乎正在使用默认配置输出什么,但是如果我只想看到每行延迟而不是这么大的csv值怎么办?我知道,当您在GUI模式下使用JMeter并添加新的侦听器(例如查看表中的结果")时,您可以配置应将确切的内容写到生成的jtl文件中,例如响应代码,延迟,线程名,等

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.

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

I just want the latency data, however. How can configure this through this command line instead of through the GUI?

谢谢!

推荐答案

更新:以下是正确的,但最好的方法是修改user.properties文件,以避免可能覆盖jmeter.properties的更新. (请参见文档).

Update: The following is correct, but it's considered best practice to modify the user.properties file in order to avoid updates which may overwrite jmeter.properties (See the documentation).

在jmeter.properties中检查以下属性集.

Check out following set of properties in 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可以找出哪一列是什么?

print_field_names is by default false. Set it to true to figure out what column is what?

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表示第一个字段,那么以大值作为时代的时间戳.

By the way that big value is timestamp in epoch, if you meant 1st field by big value.

这篇关于在非GUI模式下运行JMeter时配置结果文件数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆