简体   繁体   English

如何在jmeter中获取网页的响应时间?

[英]how to get the response time of web pages in jmeter?

How to generte csv file and load csv using response time graph listener? 如何使用响应时间图监听器来创建csv文件并加载csv?

Can any one help me in detail that how we find response time in jmeter ? 任何人都可以帮我详细说明我们如何在jmeter中找到响应时间吗?

If you run JMeter in command-line non-GUI mode as follows: 如果在命令行非GUI模式下运行JMeter,如下所示:

jmeter -n -t /path/to/your/test_plan.jmx -l /path/to/results_file.jtl

your results_file.jtl content will look like: 您的results_file.jtl内容将如下所示:

1409124780902, 182 ,Logon,200,OK,Thread Group 1-1,text,true,214,0 1409124781219, 153 ,Logout,200,OK,Thread Group 1-1,text,true,110,0 1409124780902,182,登录200,OK,线程组1-1,文字,真实,214,0 1409124781219,153,注销,200,OK,线程组1-1,文字,真实,110,0

where second column is page response time in milliseconds. 其中第二列是页面响应时间,以毫秒为单位。

Other values are: 其他值是:

  • "1409124780902" - current time stamp in ms “1409124780902” - 以ms为单位的当前时间戳
  • "182" - page response time “182” - 页面响应时间
  • "Logon" - sampler name “登录” - 采样器名称
  • "200" - Response Code “200” - 响应代码
  • "OK" - Response Message “好的” - 回复消息
  • "Thread Group 1-1" - Parent Thread Group name, thread number and iteration. “线程组1-1” - 父线程组名称,线程编号和迭代。
  • "text" - response data type “text” - 响应数据类型
  • "214" - response data size in bytes “214” - 响应数据大小(以字节为单位)
  • "0" - latency “0” - 延迟

Once your test run is done you can open JMeter GUI and load this results_file.jtl into the listener of your choice. 完成测试运行后,您可以打开JMeter GUI并将此results_file.jtl加载到您选择的侦听器中。

You might also be interested in JMeter Plugins Extras Set which is capable of generating nice looking and easy understandable response-time related graphs to wit: 您可能还对JMeter Plugins Extras Set感兴趣,它能够产生漂亮且容易理解的响应时间相关图表:

You can get it by adding Reporters. 你可以通过添加记者来获得它。

Please keep in mind Reporters is cpu and memory intensive components and thus should not be used while actual load test. 请记住,记者是CPU和内存密集型组件,因此在实际负载测试时不应使用。

But for sample testing you can use it and for load test run you can get response time, average,throughput etc by saving output to jtl file in JMeter. 但是对于样本测试,您可以使用它,对于负载测试运行,您可以通过将输出保存到JMeter中的jtl文件来获得响应时间,平均值,吞吐量等。

For normal/sample run 正常/样品运行

Aggregate report gives Average response time, min, max, median etc. 汇总报告给出平均响应时间,最小值,最大值,中位数等。

在此输入图像描述

Summary report also gives the same with less details, 摘要报告也提供相同的细节,

在此输入图像描述

While performing actual run you can save output of these reporters in a jtl file. 在执行实际运行时,您可以将这些报告器的输出保存在jtl文件中。 After the test results can be analyzed from jtl files. 可以从jtl文件中分析测试结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM