当前位置:网站首页>浅谈 JMeter 运行原理
浅谈 JMeter 运行原理
2022-06-30 12:02:00 【全栈程序员站长】
接触过 LoadRunner 的朋友应该都知道,LoadRunner 可以选择是以进程方式还是线程方式运行的 。在 JMeter中我们是以线程的方式来运行,由于 JMeter 是运行在 JVM 虚拟机上的,每个进程数量就会不允许太多,当我们要大量并发时就需要大量的负载机,这显然是不经济的,再者 JAVA 也支持多线程,所以 JMeter 选择了以线程的方式来运行。
JMeter 通过线程组来驱动多个线程 (类似 LoadRunner 中的虚拟用户)运行测试脚本对被测服务器发起负载,每一个负载机上都可以运行多个线程组,如当我们测试计划中有两个线程组,JMeter 运行场景不仅可以再GUI方式中完成,还可以使用命令行,而且命令行运行的方式对于负载机的资源消耗会更小。下方是Jmeter远程运行架构图。
1:控制机
运行多台jmeter负载机进行性能测试时,被选中作为管理机的那台机器就是控制机。控制机也可以参与脚本的运行,同时它也担负管理远程负载机指挥远程负载机运行工作,且收集远程负载机运行测试结果。
2:负载机
负载机就是向被测应用服务发起负载(请求)的机器。控制机同时也是一台负载机。jmeter负载机受控制机(jmeter负载机)的管理。与支持其他远程运行的测试工具一样,负载机受控制机管理首先要启动一个客户端程序(Agent:jmeter-server.bat),这样控制机才可以接管负载机。控制机会把运行的脚本隐蔽的发送到远程负载机,但是运行的测试脚本有参数文件或者依赖jar包时,控制机并不能把他们发送到远程负载机,这种情况就需要手动拷贝,也可以用工具实现自动拷贝。
3:远程运行逻辑
远程负载机首先启动agent程序,待控制机连接;控制机连接上远程负载机;控制机发送指令(脚本及启动命令)启动线程;负载机运行脚本,回传状态(包括测试结果);控制机收集结果并显示
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/100679.html原文链接:https://javaforall.cn
边栏推荐
- How to use the plug-in mechanism to gracefully encapsulate your request hook
- 串行通信接口8250
- How to detect 3D line spectral confocal sensors in semiconductors
- 剑指 Offer 05. 替换空格: 把字符串 s 中的每个空格替换成“%20“
- Vscode select multiple words
- Essay: Research on smart home scheme
- [bug solution] fiftyone reports attributeerror: module 'CV2' has no attribute 'GAPI_ wip_ gst_ Gstreamerpipeline 'error resolution
- Shutter start from zero 006 radio switches and checkboxes
- 海思3559万能平台搭建:获取数据帧修改后编码
- 腾讯二面:@Bean 与 @Component 用在同一个类上,会怎么样?
猜你喜欢

海思3559万能平台搭建:获取数据帧修改后编码

Linux系统Redis的安装

STM32 porting the fish component of RT thread Standard Edition

Embedded sig | multi OS hybrid deployment framework

90.(cesium篇)cesium高度监听事件

After the node is installed in the NVM, the display is not internal or external when the NPM instruction is used

Set集合

How difficult is data governance and data innovation?

21. Notes on WPF binding

What is the principle of spectral confocal displacement sensor? Which fields can be applied?
随机推荐
90.(cesium篇)cesium高度监听事件
ZABBIX monitors the number of TCP connections
Typescript readonlyarray (read only array type) details
Flutter 从零开始 006 单选开关和复选框
智慧法院新征程,无纸化办公,护航智慧法院绿色庭审
ModelAtrs声音检测,基于声学特征的异响检测
DMA控制器8237A
Inner join and outer join of MySQL tables
After the node is installed in the NVM, the display is not internal or external when the NPM instruction is used
Sword finger offer 05 Replace spaces: replace each space in the string s with "%20"“
聊聊怎么做硬件兼容性检测,快速迁移到openEuler?
不同类型的变量与零究竟是如何比较
Set set
品达通用权限系统(Day 7~Day 8)
STM32 移植 RT-Thread 标准版的 FinSH 组件
A High-Precision Positioning Approach for Catenary Support Components With Multiscale Difference阅读笔记
Redis - ziplist compressed list
The format of RTSP address of each manufacturer is as follows:
Pinda general permission system (day 7~day 8)
Shutter 007 input field from zero