jmeter tcpsampler-3.1上未选中的“重用连接"会强制建立新连接吗? [英] jmeter tcpsampler - unchecked 'reuse connection' on 3.1 forces new connection?

查看:328
本文介绍了jmeter tcpsampler-3.1上未选中的“重用连接"会强制建立新连接吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个非常基本的问题,希望能快速获得有关JMETER 3.1的答案:

A very basic question hoping for a quick answer regarding JMETER 3.1:

TCPSampler,如果未选中重用连接",是否会为每个线程和/或循环中的每个项目强制建立新的TCP连接?

TCPSampler, if you have 're-use connection' unchecked, does it force a new TCP connection for each thread and/or over each item in the loop?

示例:给定5个线程具有10个循环,它将发送50个单独的tcp连接,5个连接,10个连接,还是会在没有检查的情况下尝试重用现有连接?

example: Given 5 threads with a 10 loop, will it send 50 individual tcp connections, 5 connections, 10 connections, or will it try to re-use existing connections if they are available even though it is unchecked?

感谢您的澄清-先前的搜索是基于较旧的版本进行的(2006ish范围似乎是最后一次被问到这个问题的地方).

Thanks for any clarification -- prior searches were based on older versions (2006ish range seems to be the last time this question was heavily asked).

推荐答案

TCPSampler,如果未选中重用连接",是否会强制执行 是否为每个线程和/或循环中的每个项目建立了新的TCP连接?

TCPSampler, if you have 're-use connection' unchecked, does it force a new TCP connection for each thread and/or over each item in the loop?

后者.每个物品. 意思是,在每个线程的每个循环中对采样器的每次调用. 如果用循环"表示循环迭代计数",并且每个循环仅包含一个TCP采样器-是的,则5个线程将​​为50.

The latter. Each item. Means, every call to sampler in every loop in every thread. If by "loops" you meant "loop iterations count", and each loop contain only one TCP sampler - then yes, it's gonna be 50 for 5 threads.

因此,基本上,每次调用采样器-就是答案.

So, basically, every call to sampler - that's the answer.

关于启用此选项,它比较复杂,请检查:

As for having this option turned on, it is more comlicated, check this:

如果选择重新使用连接",则连接之间将共享 采样器在同一线程中,但要提供完全相同的主机名 使用字符串和端口.不同的主机/端口组合将使用 不同的连接,以及不同的线程.如果两者都重用 选择连接"和关闭连接",则插座将变为 运行采样器后关闭.在下一个采样器上,另一个套接字 将被创建.您可能需要在每个插座的末尾关闭一个插座 线程循环.如果检测到错误-或没有重新使用连接" selected-套接字已关闭.另一个插座将在 下一个示例.

If "Re-use connection" is selected, connections are shared between Samplers in the same thread, provided that the exact same host name string and port are used. Different hosts/port combinations will use different connections, as will different threads. If both of "Re-use connection" and "Close connection" are selected, the socket will be closed after running the sampler. On the next sampler, another socket will be created. You may want to close a socket at the end of each thread loop. If an error is detected - or "Re-use connection" is not selected - the socket is closed. Another socket will be reopened on the next sample.

这篇关于jmeter tcpsampler-3.1上未选中的“重用连接"会强制建立新连接吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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