0

Question

I am using the following targets file

GET https://foo.bar.com
GET https://bar.foo.com
GET https://zoo.lander.com

and then issue

vegeta attack -targets=targetsFile -duration=2s | tee results.bin | vegeta report  

I then get an aggregated report in the likes of :

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

Is there a way to get a distinct report (and perhaps plot) per target? Do I have to split the targets?

pkaramol
  • 16,451
  • 43
  • 149
  • 324

1 Answers1

3

I don't think Vegeta supports this. I think you can use Ddosify by passing a config file. It will print the metrics of each endpoint.

Example config file for your scenario;

{
    "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
        }
    ]
}

Then run;

ddosify -config config.json

Output;

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
raider_
  • 135
  • 9