Jmeter-http采样器的第一次迭代花费的时间很大 [英] Jmeter - The time taken by first iteration of http sampler is large

查看:75
本文介绍了Jmeter-http采样器的第一次迭代花费的时间很大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Jmeter的新手.我已经编写了一个运行5次迭代的http采样器,这就是我得到的读数

I am new to Jmeter. I have written a http sampler which I am running for 5 iteration and this is the reading I have been getting

805 160 148 185 143

805 160 148 185 143

我要注意的是,与后四个相比,第一次迭代花费的时间很大.每次运行采样器时,我都会观察到同样的情况. 只是为了提供信息,我在http采样器中关闭了以下内容 UseKeepAlive =关闭 jmeter文件中的https.use.cached.ssl.context = false.

What I am noticing is the time taken for first iteration is large as compared to last four. I am observing the same everytime I am running the sampler. Just for info I have following things off in the http sampler UseKeepAlive= off https.use.cached.ssl.context=false in the jmeter file.

问题就是为什么它可能会发生.

Question is why it may be happening.

推荐答案

您好,有很多种方法可以实现:

Hi there are many ways this can happen:

  1. 第一次运行Jmeter(例如从命令行)时,可能需要一些时间来加载库,自定义jars等.我发现,通过单独的线程组引入热身阶段是一个好习惯.
  2. li>
  3. 在服务器端可能会发生同样的情况.但是,在这些情况下,您应该看到只有最开始的样本速度较慢.以下示例应找到已加载/编译的.jars和d.jsp.
  4. 检查HTTP缓存设置:如果您有大对象(图像和/或电影等):将对象下载一次,然后保存在客户端缓存中.
  5. 您应调查应用程序内部有许多缓存级别.例如,如果您从数据库中读取了一些数据,并且每次测试的数据保持不变,则可能只读取了一次数据,然后将其保存在缓存中.

这篇关于Jmeter-http采样器的第一次迭代花费的时间很大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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