当前位置:网站首页>Jmeter 之压测入门
Jmeter 之压测入门
2022-07-04 19:46:00 【泥点子】
一、压测是什么?
压测常用名词解析
TPS:每秒执行的事务数量(例每分钟执行了70个事务,tps= 70/60=1.17,说明每秒可以处理1.17个事务)
平均响应时间:就是处理一个事务所平均需要的时间
二、压测的目的和意义
目的:
1、测试系统最大的处理能力,寻找系统最大的tps,判断tps和响应时间是否满足预期
2、测试系统最大并发数,当系统出现宕机,程序崩溃,报错率持续上升,程序无响应,响应时间超过可忍受范围等即可认为系统已到达最大并发数。
三、jmeter 压测
1、jmeter的使用
1.1、jmeter的两种线程组运行模式
a、运行次数
即脚本的运行是指定次数来确定的
b、运行持续时间
即在指定时间内,会根据设置的时间来运行脚本
1.2 一般用Jmeter在liunx 命令行下,一般需要压力机,压测机和项目会分开
1.2.1 在压力机配置好环境之后
压力机需要安装并配置好JDK
然后把在windows 调试好的脚本上传到压力机上
需要进到Jmeter 根目录下添加执行权限 chomod -R +x./*
1.2 .2使用命令行进行压测
jmeter -n -t XXX.jmx -l result.jtl
-n:命令行模式,no-gui
-t:jmx脚本路径
-l : jtl结果文件存放路径
2、性能测试策略
2.1、加压策略
递进增加并发数,观察tps和响应时间,并记录tps和响应时间,寻找拐点
2.2、执行策略
a、试压阶段:先按照递进增加选择一个持续时间(具体时间按照不同场景选择,一般选择180S/60S),并发数(根据不同项目决定并发数,一开始可以选择每次增加10,如果增加10发现性能还是挺好,就可以增加多点并发数,缩减测试时间),并记录tps和响应时间,找出拐点
b、重压阶段:找出拐点后,再取拐点的前后5组并发数,重新跑(3-5分钟)再记录详细数据
3.3 性能测试策略例子:
单接口压测:顾名思义,就是只对一个接口进行压测
混合接口压测:按比例来决定并发数
边栏推荐
- Some suggestions for interface design
- NLP, vision, chip What is the development direction of AI? Release of the outlook report of Qingyuan Association [download attached]
- Win11无法将值写入注册表项如何解决?
- idea插件
- Advantages of semantic tags and block level inline elements
- idea大小写快捷键
- CDGA|数据治理不得不坚持的六个原则
- idea配置标准注释
- hash 表的概念及应用
- Browser render page pass
猜你喜欢

Selected review | machine learning technology for Cataract Classification / classification

Flet tutorial 04 basic introduction to filledtonalbutton (tutorial includes source code)

What if the WiFi of win11 system always drops? Solution of WiFi total drop in win11 system

电脑页面不能全屏怎么办?Win11页面不能全屏的解决方法

Common verification rules of form components -1 (continuously updating ~)

【服务器数据恢复】某品牌服务器存储raid5数据恢复案例

What if win11u disk refuses access? An effective solution to win11u disk access denial

Idea restore default shortcut key

【观察】联想:3X(1+N)智慧办公解决方案,释放办公生产力“乘数效应”

Win11共享文件打不开怎么办?Win11共享文件打不开的解决方法
随机推荐
浏览器渲染页面过程
What if win11u disk refuses access? An effective solution to win11u disk access denial
E-week finance | Q1 the number of active people in the insurance industry was 86.8867 million, and the licenses of 19 Payment institutions were cancelled
Understand Alibaba cloud's secret weapon "dragon architecture" in the article "science popularization talent"
ICML 2022 | Meta提出鲁棒的多目标贝叶斯优化方法,有效应对输入噪声
NLP、视觉、芯片...AI重点方向发展几何?青源会展望报告发布[附下载]
《动手学深度学习》(三) -- 卷积神经网络 CNN
Win11无法将值写入注册表项如何解决?
idea大小写快捷键
【观察】联想:3X(1+N)智慧办公解决方案,释放办公生产力“乘数效应”
MySQL - database query - use of aggregate function, aggregate query, grouping query
Flet tutorial 05 outlinedbutton basic introduction (tutorial includes source code)
How does wincc7.5 SP1 find variables and their positions through cross indexing?
伦敦银走势图分析的新方法
Ten years' experience of byte test engineer directly hits the pain point of UI automation test
记录线上bug解决list(未完待续7/4)
Aiming at the "amnesia" of deep learning, scientists proposed that based on similarity weighted interleaved learning, they can board PNAS
Common verification rules of form components -1 (continuously updating ~)
jekins初始化密码没有或找不到
Pytorch---使用Pytorch实现LinkNet进行语义分割