问题
我正在使用以下目标文件
GET https://foo.bar.com
GET https://bar.foo.com
GET https://zoo.lander.com然后发布
vegeta attack -targets=targetsFile -duration=2s | tee results.bin | vegeta report 然后,我得到一个聚合报告,如下所示:
Requests [total, rate, throughput] 100, 50.57, 24.76
Duration [total, attack, wait] 3.837s, 1.978s, 1.859s
Latencies [min, mean, 50, 90, 95, 99, max] 156.862ms, 583.523ms, 417.547ms, 832.023ms, 1.114s, 2.816s, 3.677s
Bytes In [total, mean] 20643, 206.43
Bytes Out [total, mean] 0, 0.00
Success [ratio] 95.00%
Status Codes [code:count] 200:95 404:5
Error Set:
404 Not Found有没有办法让每个目标都有明确的报告(也许还有阴谋)?我一定要把目标分开吗?
发布于 2022-02-08 14:14:00
我不认为Vegeta支持这个。我认为您可以通过传递一个配置文件来使用多西。它将打印每个端点的指标。
您的场景的示例配置文件;
{
"request_count": 100,
"load_type": "linear",
"duration": 2,
"output": "stdout",
"steps": [
{
"id": 1,
"url": "https://foo.bar.com",
"protocol": "https",
"method": "GET",
"timeout": 3
},
{
"id": 2,
"url": "https://bar.foo.com",
"protocol": "https",
"method": "GET",
"timeout": 3
},
{
"id": 3,
"url": "https://zoo.lander.com",
"protocol": "https",
"method": "GET",
"timeout": 3
}
]
}
然后跑;
ddosify -config config.json产出;
RESULT
-------------------------------------
1. Step 1
---------------------------------
Success Count: 100 (100%)
Failed Count: 0 (0%)
Durations (Avg):
DNS :0.0743s
Connection :0.0528s
TLS :0.0734s
Request Write :0.0001s
Server Processing :0.0918s
Response Read :0.3214s
Total :0.6138s
Status Code (Message) :Count
200 (OK) :100
2. Step 2
---------------------------------
Success Count: 100 (100%)
Failed Count: 0 (0%)
Durations (Avg):
DNS :0.0573s
Connection :0.0536s
TLS :0.0747s
Request Write :0.0001s
Server Processing :0.0906s
Response Read :0.3065s
Total :0.5828s
Status Code (Message) :Count
200 (OK) :100
3. Step 3
---------------------------------
Success Count: 100 (100%)
Failed Count: 0 (0%)
Durations (Avg):
DNS :0.0541s
Connection :0.0531s
TLS :0.0753s
Request Write :0.0001s
Server Processing :0.0885s
Response Read :0.3167s
Total :0.5878s
Status Code (Message) :Count
200 (OK) :100
https://stackoverflow.com/questions/71017168
复制相似问题