feat:更新秒杀系统文档

This commit is contained in:
2026-06-22 15:51:10 +08:00
parent 2be39b4d81
commit 9fb8c23518
2 changed files with 20 additions and 1 deletions

View File

@@ -108,4 +108,23 @@ return ResponseEntity.status(200).body("秒杀成功");
  为了防止重复创建订单,还需要进行一次幂等校验,即根据订单号的唯一性判断是否有重复的。
# 三、压测
  采用ApiPost工具进行压测。
  采用JMeter工具进行压测。
## 3.1 创建测试数据
  新建users.csv输入以下内容
```csv
1
2
3
...
```
  然后在`线程组->添加->配置元件->CSV Data Set Config`设置变量名称为userId。
::: tip
不需要输入表头。
:::
## 3.2 HTTP请求
  设置请求路径为`/seckill/${userId}`设置线程组参数例如线程数1000Ramp-Up时间5秒循环次数为1000创建聚合报告执行线程查看结果。
![JMeter](../images/jmeter.png)

BIN
docs/Web/images/jmeter.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB