当前位置:网站首页>浅谈 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
边栏推荐
- pyqt5界面的布局与资源文件的载入
- 剑指 Offer 05. 替换空格: 把字符串 s 中的每个空格替换成“%20“
- grep匹配查找
- 1175. prime number arrangement: application of multiplication principle
- 1254. 统计封闭岛屿的数目
- 60 个神级 VS Code 插件!!
- Generate entity classes from SQL Server database tables through EF core framework
- [cloud native | kubernetes] in depth understanding of deployment (VIII)
- Typescript readonlyarray (read only array type) details
- What is the principle of spectral confocal displacement sensor? Which fields can be applied?
猜你喜欢

SuperMap iDesktop 常见倾斜数据处理全流程解析

Map集合

Four Misunderstandings of Internet Marketing

MATLAB中polarplot函数使用

品达通用权限系统(Day 7~Day 8)

智慧法院新征程,无纸化办公,护航智慧法院绿色庭审

会议预告 | 华为 2012 实验室全球软件技术峰会-欧洲分会场

Beego development blog system learning (II)

Map collection

A Generic Deep-Learning-Based Approach for Automated Surface Inspection-论文阅读笔记
随机推荐
Understanding and learning of MySQL indexing and optimization
Map集合
使用Power Designer工具构建数据库模型
聊聊怎么做硬件兼容性检测,快速迁移到openEuler?
Introduction to new features of ES6
3D视觉检测在生产流水的应用有哪些
Sword finger offer 05 Replace spaces: replace each space in the string s with "%20"“
60 个神级 VS Code 插件!!
21. Notes on WPF binding
ZABBIX monitors the number of TCP connections
[cf] 803 div2 A. XOR Mixup
The website with id 0 that was requested wasn‘t found. Verify the website and try again
200. number of islands
A High-Precision Positioning Approach for Catenary Support Components With Multiscale Difference阅读笔记
麒麟软件韩乃平:数字中国建设需要自己的开源根社区
3D线光谱共焦传感器在半导体如何检测
[bug solution] fiftyone reports attributeerror: module 'CV2' has no attribute 'GAPI_ wip_ gst_ Gstreamerpipeline 'error resolution
Getting started with the go language is simple: go handles XML files
grep匹配查找
Shutter start from zero 006 radio switches and checkboxes