Jmeter运行结果与手动捕获的响应时间之间存在Jmeter响应时间差 [英] There is Jmeter response time difference between Jmeter run results and manually captured the response time

查看:1110
本文介绍了Jmeter运行结果与手动捕获的响应时间之间存在Jmeter响应时间差的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Jmeter运行结果与通过Web应用程序上的秒表从本地系统手动捕获的响应时间之间存在Jmeter响应时间差.

There is Jmeter response time difference between Jmeter run results and manually captured the response time from the local system using stop watch on the web application.

  1. 从本地Windows系统浏览该Web应用程序,并使用秒表查看加载页面的响应时间.
  2. 以非gui/gui模式运行Jmeter并观察响应时间(仅用于侦听器的侦听器,运行脚本时未添加侦听器)
  3. 可以看出两者之间存在差异.请建议如何知道Jmeter是否已捕获正确的响应时间.

推荐答案

JMeter可以根据每个请求捕获三个基本度量:

JMeter have three basic measurements it captures per request:

  • 经过时间(从开始发送请求到接收到最后一位的总时间)

  • Elapsed Time (which is overall timespan from the point when it just starts sending request to the last bit received)

延迟(在同一时间点开始,并在服务器开始响应时结束)

Latency (which starts the same point in time and ends when server starts responding)

连接时间(包括在延迟中,基本上是与服务器握手的时间,包括SSL/TLS协商)

And Connect time (which is included in latency and is basically the time for handshakes with server, including SSL/TLS negotiations)

因此,如果您在侦听器之间设置数据写入器(例如,SimpleDataWriter,尽管AggregateReport& SummaryReport也可以这样做),则您会在数据文件中看到这些指标(而标准的侦听器/可视化器/聚合器滞后时间).

So if you set a data writer among your listeners (e.g SimpleDataWriter, although AggregateReport & SummaryReport can do it as well), you'll see these metrics in your data file (while standard listeners/visualisers/aggregators stuck to elapsed time only).

但是请注意,这些指标不包括响应呈现,尤其是浏览器要执行的任何代码.

But mind that these metrics doesn't include response rendering, and especially any code to be executed by browser.

JMeter根本不做任何事情:显然,它仅衡量Server + Network的综合性能,跳过客户端的所有操作(除了最基本的要求,例如协议协商).

JMeter just doesn't do it at all: obviously, it measures just the combined performance of Server + Network, skipping everything on the client side (except for bare necessities, like protocol negotiations).

这也许可以解释您所经历的差异.

That might explain the difference you've experienced.

以及记录的服务器处理时间之间的差异& JMeter测量的响应时间:服务器只是不计算网络带来的收益.

As well as the difference between logged server processing times & the response times measured by JMeter: server just doesn't count what the network brings in.

PS而且您不必坐在浏览器上点击秒表:现代的秒表具有开发工具,能够为您显示经过各个阶段划分的精确计时.例如,只需在Chrome中调用Ctrl + Shift + I,然后切换到网络标签&在您进行请求时,可以看到那里的时间安排.

PS And you don't have to sit and click on stopwatch with your browser: modern ones have a Dev Tools capable of showing you the precision timings divided by stages. E.g., just call Ctrl+Shift+I in Chrome, switch to network tab & behold the timings right there as you doing your requests.

这篇关于Jmeter运行结果与手动捕获的响应时间之间存在Jmeter响应时间差的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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