anteon icon indicating copy to clipboard operation
anteon copied to clipboard

linear load test type doesn't work

Open iveahugeship opened this issue 2 years ago • 2 comments

Hello!

I've tried to make load tests on my services and it seems that linear type doesn't work correctly.

I think linear load test means that total requests number evenly spliited over the test duration time. For example:

request_count=100
duration=10

With this configuration 10 requests will be sent every second.

Another example:

request_count=10
duration=100

With this configuration 1 request will be sent every 10 second.

How does it work now: all requests are sent in the beginning of test and the rest of the time Ddosify does nothing. I've attach example of my configuration and the result of test where it is seen (after about 5 seconds all requests will be sent).

linear-config.txt

{
  "request_count": 15,
  "duration": 30,
  "load_type": "linear",
  "output": "stdout",
  "steps": [
    {
      "id": 1,
      "url": "https://target_site.com/endpoint1",
      "protocol": "https",
      "method": "GET",
      "timeout": 5
    },
    {
      "id": 2,
      "url": "https://target_site.com/endpoint2",
      "protocol": "https",
      "method": "GET",
      "timeout": 5
    },
    {
      "id": 3,
      "url": "https://target_site.com/endpoint3",
      "protocol": "https",
      "method": "GET",
      "timeout": 5
    },
    {
      "id": 4,
      "url": "https://target_site.com/endpoint4",
      "protocol": "https",
      "method": "GET",
      "timeout": 5
    },
    {
      "id": 5,
      "url": "https://target_site.com/endpoint5",
      "protocol": "https",
      "method": "GET",
      "timeout": 5
    },
    {
      "id": 6,
      "url": "https://target_site.com/endpoint6",
      "protocol": "https",
      "method": "GET",
      "timeout": 5
    },
    {
      "id": 7,
      "url": "https://target_site.com/endpoint7",
      "protocol": "https",
      "method": "GET",
      "timeout": 5
    },
    {
      "id": 8,
      "url": "https://target_site.com/endpoint8",
      "protocol": "https",
      "method": "GET",
      "timeout": 5
    },
    {
      "id": 9,
      "url": "https://target_site.com/endpoint9",
      "protocol": "https",
      "method": "GET",
      "timeout": 5
    },
    {
      "id": 10,
      "url": "https://target_site.com/endpoint10",
      "protocol": "https",
      "method": "GET",
      "timeout": 5
    },
    {
      "id": 11,
      "url": "https://target_site.com/endpoint11",
      "protocol": "https",
      "method": "GET",
      "timeout": 5
    },
    {
      "id": 12,
      "url": "https://target_site.com/endpoint12",
      "protocol": "https",
      "method": "GET",
      "timeout": 5
    },
    {
      "id": 13,
      "url": "https://target_site.com/endpoint13",
      "protocol": "https",
      "method": "GET",
      "timeout": 5
    },
    {
      "id": 14,
      "url": "https://target_site.com/endpoint14",
      "protocol": "https",
      "method": "GET",
      "timeout": 5
    },
    {
      "id": 15,
      "url": "https://target_site.com/endpoint15",
      "protocol": "https",
      "method": "GET",
      "timeout": 5
    },
    {
      "id": 16,
      "url": "https://target_site.com/endpoint16",
      "protocol": "https",
      "method": "GET",
      "timeout": 5
    }
  ]
}

linear-result.txt

⚙️  Initializing... 
🔥 Engine fired. 

🛑 CTRL+C to gracefully stop.
✔️  Successful Run: 0        0%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 0.00000s
✔️  Successful Run: 0        0%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 0.00000s
✔️  Successful Run: 0        0%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 0.00000s
✔️  Successful Run: 13     100%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 4.59933s
✔️  Successful Run: 15     100%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 4.64857s
✔️  Successful Run: 15     100%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 4.64857s
✔️  Successful Run: 15     100%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 4.64857s
✔️  Successful Run: 15     100%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 4.64857s
✔️  Successful Run: 15     100%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 4.64857s
✔️  Successful Run: 15     100%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 4.64857s
✔️  Successful Run: 15     100%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 4.64857s
✔️  Successful Run: 15     100%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 4.64857s
✔️  Successful Run: 15     100%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 4.64857s
✔️  Successful Run: 15     100%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 4.64857s
✔️  Successful Run: 15     100%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 4.64857s
✔️  Successful Run: 15     100%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 4.64857s
✔️  Successful Run: 15     100%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 4.64857s
✔️  Successful Run: 15     100%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 4.64857s
✔️  Successful Run: 15     100%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 4.64857s
✔️  Successful Run: 15     100%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 4.64857s
✔️  Successful Run: 15     100%       ❌ Failed Run: 0        0%       ⏱️  Avg. Duration: 4.64857s

RESULT
-------------------------------------
Step 1
-------------------------------------
Success Count:    15    (100%)
Failed Count:     0     (0%)

Durations (Avg):
  DNS                  :0.0106s
  Connection           :0.0005s
  TLS                  :0.0025s
  Request Write        :0.0001s
  Server Processing    :0.7596s
  Response Read        :0.0000s
  Total                :0.7733s

Status Code (Message) :Count
  200 (OK)    :15

Step 2
-------------------------------------
Success Count:    15    (100%)
Failed Count:     0     (0%)

Durations (Avg):
  DNS                  :0.0107s
  Connection           :0.0003s
  TLS                  :0.0022s
  Request Write        :0.0001s
  Server Processing    :0.3240s
  Response Read        :0.0000s
  Total                :0.3373s

Status Code (Message) :Count
  200 (OK)    :15

Step 3
-------------------------------------
Success Count:    15    (100%)
Failed Count:     0     (0%)

Durations (Avg):
  DNS                  :0.0112s
  Connection           :0.0003s
  TLS                  :0.0022s
  Request Write        :0.0001s
  Server Processing    :0.2309s
  Response Read        :0.0000s
  Total                :0.2447s

Status Code (Message) :Count
  200 (OK)    :15

Step 4
-------------------------------------
Success Count:    15    (100%)
Failed Count:     0     (0%)

Durations (Avg):
  DNS                  :0.0101s
  Connection           :0.0003s
  TLS                  :0.0024s
  Request Write        :0.0001s
  Server Processing    :0.6788s
  Response Read        :0.0001s
  Total                :0.6919s

Status Code (Message) :Count
  200 (OK)    :15

Step 5
-------------------------------------
Success Count:    15    (100%)
Failed Count:     0     (0%)

Durations (Avg):
  DNS                  :0.0111s
  Connection           :0.0003s
  TLS                  :0.0032s
  Request Write        :0.0001s
  Server Processing    :0.3239s
  Response Read        :0.0001s
  Total                :0.3388s

Status Code (Message) :Count
  200 (OK)    :15

Step 6
-------------------------------------
Success Count:    15    (100%)
Failed Count:     0     (0%)

Durations (Avg):
  DNS                  :0.0090s
  Connection           :0.0003s
  TLS                  :0.0024s
  Request Write        :0.0002s
  Server Processing    :0.2186s
  Response Read        :0.0000s
  Total                :0.2305s

Status Code (Message) :Count
  200 (OK)    :15

Step 7
-------------------------------------
Success Count:    15    (100%)
Failed Count:     0     (0%)

Durations (Avg):
  DNS                  :0.0096s
  Connection           :0.0003s
  TLS                  :0.0032s
  Request Write        :0.0001s
  Server Processing    :0.0966s
  Response Read        :0.0000s
  Total                :0.1098s

Status Code (Message) :Count
  200 (OK)    :15

Step 8
-------------------------------------
Success Count:    15    (100%)
Failed Count:     0     (0%)

Durations (Avg):
  DNS                  :0.0087s
  Connection           :0.0003s
  TLS                  :0.0023s
  Request Write        :0.0002s
  Server Processing    :0.2409s
  Response Read        :0.0000s
  Total                :0.2524s

Status Code (Message) :Count
  200 (OK)    :15

Step 9
-------------------------------------
Success Count:    15    (100%)
Failed Count:     0     (0%)

Durations (Avg):
  DNS                  :0.0101s
  Connection           :0.0004s
  TLS                  :0.0025s
  Request Write        :0.0001s
  Server Processing    :0.2421s
  Response Read        :0.0001s
  Total                :0.2553s

Status Code (Message) :Count
  200 (OK)    :15

Step 10
-------------------------------------
Success Count:    15    (100%)
Failed Count:     0     (0%)

Durations (Avg):
  DNS                  :0.0096s
  Connection           :0.0004s
  TLS                  :0.0025s
  Request Write        :0.0001s
  Server Processing    :0.1806s
  Response Read        :0.0000s
  Total                :0.1932s

Status Code (Message) :Count
  200 (OK)    :15

Step 11
-------------------------------------
Success Count:    15    (100%)
Failed Count:     0     (0%)

Durations (Avg):
  DNS                  :0.0081s
  Connection           :0.0003s
  TLS                  :0.0026s
  Request Write        :0.0001s
  Server Processing    :0.4037s
  Response Read        :0.0000s
  Total                :0.4148s

Status Code (Message) :Count
  200 (OK)    :15

Step 12
-------------------------------------
Success Count:    15    (100%)
Failed Count:     0     (0%)

Durations (Avg):
  DNS                  :0.0081s
  Connection           :0.0004s
  TLS                  :0.0025s
  Request Write        :0.0001s
  Server Processing    :0.2880s
  Response Read        :0.0000s
  Total                :0.2991s

Status Code (Message) :Count
  200 (OK)    :15

Step 13
-------------------------------------
Success Count:    15    (100%)
Failed Count:     0     (0%)

Durations (Avg):
  DNS                  :0.0099s
  Connection           :0.0003s
  TLS                  :0.0023s
  Request Write        :0.0001s
  Server Processing    :0.1818s
  Response Read        :0.0000s
  Total                :0.1944s

Status Code (Message) :Count
  200 (OK)    :15

Step 14
-------------------------------------
Success Count:    15    (100%)
Failed Count:     0     (0%)

Durations (Avg):
  DNS                  :0.0092s
  Connection           :0.0003s
  TLS                  :0.0023s
  Request Write        :0.0002s
  Server Processing    :0.1217s
  Response Read        :0.0000s
  Total                :0.1337s

Status Code (Message) :Count
  200 (OK)    :15

Step 15
-------------------------------------
Success Count:    15    (100%)
Failed Count:     0     (0%)

Durations (Avg):
  DNS                  :0.0091s
  Connection           :0.0003s
  TLS                  :0.0021s
  Request Write        :0.0001s
  Server Processing    :0.0878s
  Response Read        :0.0000s
  Total                :0.0993s

Status Code (Message) :Count
  200 (OK)    :15

Step 16
-------------------------------------
Success Count:    15    (100%)
Failed Count:     0     (0%)

Durations (Avg):
  DNS                  :0.0100s
  Connection           :0.0003s
  TLS                  :0.0023s
  Request Write        :0.0002s
  Server Processing    :0.0674s
  Response Read        :0.0000s
  Total                :0.0801s

Status Code (Message) :Count
  200 (OK)    :15

iveahugeship avatar Nov 10 '21 21:11 iveahugeship

Here is the discussion thread in Discord.

Actions;

  • Decrease minimum iteration count per second to 1
  • Update readme
  • Change request_count to iteration_count

Thanks again @iveahugeship. I'll close this issue once the related PR is merged.

kursataktas avatar Nov 10 '21 21:11 kursataktas

Update; Iteration per second for linear load type decreased to 1 with v0.5.2. request_count name change will be added later.

kursataktas avatar Nov 12 '21 14:11 kursataktas

is there any update on this?

soknifedev avatar Feb 02 '23 03:02 soknifedev

We forgot to close this issue. request_count changed to iteration_count on newer versions of Ddosify.

kursataktas avatar Feb 02 '23 10:02 kursataktas