当前位置:网站首页>7、 Logic of JMeter sending request
7、 Logic of JMeter sending request
2022-07-23 16:16:00 【Proud cat sauce】
One 、 Multiple requests under the thread group , After getting the return value of the last request , Then trigger the next request
Under the same thread group ,2 A request , request A, And request B.

Logic :
Execute the request first A, request A Get the returned results , Just start to execute the request B.
test :
I use spring boot Wrote two requests , request A And request B.
Interface A After receiving the request , sleep 3S Then return the result
Interface B After receiving the request , Return results immediately
package com.example.testjmeter.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.Map;
import java.util.stream.Collectors;
@RestController
public class MockController {
@Autowired
private HttpServletRequest request;
@RequestMapping("/a")
public String doMock() {
System.out.println(" Server received A request ------");
String RequestURI = request.getRequestURI();
String response = " The server has finished processing A request ";
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println(response);
return response ;
}
@RequestMapping("/b")
public String doMock1() {
System.out.println(" Server received B request ----");
String RequestURI = request.getRequestURI();
String response = " The server has finished processing B request ";
// try {
// Thread.sleep(2000);
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
System.out.println(response);
return response ;
}
}
then jmeter Thread group ,1 concurrent , loop 1 Time , Then execute the script .
jmeter Result tree display , Do it first A request , It was made after the war B request .

Check the return side processing :

although A Interface is very slow , But it's still done A Just received B request .
Two 、 A request , Multiple concurrent
for example , A request , Set up 10 concurrent , Then this 10 A request , Almost simultaneously .
test 1
Interface request ,C,10 concurrent ,
for the first time 1s Ten concurrent
The second, 10s Ten concurrent
边栏推荐
- SOC的第一个Hello_World实验
- Google Earth engine -- null value problem in image statistics
- ORA-01654错误:表空间满了,插入失败
- Packaging and use of alamofire framework
- 关于初始化page入参的设计思路
- Umijs - data transmission between main and sub applications of Qiankun
- js过滤/替换敏感字符
- 超详细MP4格式分析
- 太拼了!腾讯T4大佬凌晨4点还在熬夜,竟是在整理这分布式事务笔记
- Exclusive interview | open source Summer Star Niu Xuewei
猜你喜欢

Without Huawei, Qualcomm will raise prices at will, and domestic mobile phones that lack core technology can only be slaughtered
![php:filter伪协议之[BSidesCF 2020]Had a bad day](/img/ad/1e23fadb3f1ce36b297aaa767d9099.png)
php:filter伪协议之[BSidesCF 2020]Had a bad day

後綴錶達式(暑假每日一題 4)

Leetcode high frequency question: the array can be changed into a non descending state after at least several operations

Custom encapsulation pop-up box (with progress bar)

ECS remote monitoring

【深入浅出向】从自信息到熵、从相对熵到交叉熵,nn.CrossEntropyLoss, 交叉熵损失函数与softmax,多标签分类
![[cloud native] continuous integration and deployment (Jenkins)](/img/3a/2cd6f0c768bd920b3de6d4f5b13cd5.png)
[cloud native] continuous integration and deployment (Jenkins)

Gear monthly update June

lc marathon 7.23
随机推荐
harbor镜像仓库
死锁的3种处理策略
New infrastructure of enterprise data in the era of digital transformation | love Analysis Report
redis 主从复制
"1+1 > 10": potential combination of no code / low code and RPA Technology
[SUCTF 2018]MultiSQL(mysql预编译)
【攻防世界WEB】难度三星9分入门题(上):simple_js、mfw
Bean Validation核心組件篇----04
How beautiful can VIM be configured?
Class homework (5) -- 576. Hungry cattle
Alamofire 框架封装与使用
How to become an elegant Hardware Engineer?
Ultra detailed MP4 format analysis
redis 哨兵模式
Comparison of functional characteristics and parameters of several solar panel battery charging management ICs cs5363, cs5350 and cs5328
Idées de conception sur l'initialisation des paramètres d'entrée de page
CONDA set up proxy
数字化转型时代的企业数据新基建 | 爱分析报告
《代码之丑》学习总结
太拼了!腾讯T4大佬凌晨4点还在熬夜,竟是在整理这分布式事务笔记