K6 scenarios to generate specific request per second rate

24 views Asked by At

I wrote the following options with K6 scenarios for my performance testing in hoping to achieve traffics with different request per second while keeping the virtual users - VUs constant at 100.


    export let options = {
    scenarios: {
        foo: {
            executor: 'ramping-arrival-rate',
            preAllocatedVUs: 100, //start & end at 100 VUs

            startRate: baseRPS, timeUnit: '1s',
            stages: [
                { target: baseRPS * 10, duration: '0s' },   // jump to 10 iterations/s immediately
                { target: baseRPS * 10, duration: '30s' },  // stay at 10 iterations/s for the next 30 seconds
                { target: baseRPS * 20, duration: '0s' },   // jump to 20 iterations/s immediately
                { target: baseRPS * 20, duration: '30s' },  // stay at 20 iterations/s for the next 30 seconds
                { target: baseRPS * 30, duration: '0s' },   // jump to 30 iterations/s immediately
                { target: baseRPS * 30, duration: '30s' },  // stay at 30 iterations/s for the next 30 seconds
            ],
        },
    },
    insecureSkipTLSVerify: true,
    };

The execution shows K6 went through each stage accordingly. My goal is to identify if VUs contribute to the performance degradation or the request per second.

enter image description here

enter image description here

enter image description here

I am surprised when I see the K6 result. Because it shows on average, it only generates around 7 request per second.

enter image description here

Did I do something wrong here in the option configuration or the 100VUs is not enough to generate more request per seconds?

Furthermore, my Grafana dashboard which I streamed my K6 test results to shows the Request per second rate never really change that drastically throughout my test durations.

enter image description here

0

There are 0 answers