Hi still learning about k6 and trying multiple scenarios script. But ran into the error but my constant-arrival-rate
executor isn’t using stages only ramping-vus
is. So why the error ?
k6 v0.40.0 (2022-09-08T09:06:02+0000/v0.39.0-92-gdcbe2f9c, go1.18.6, linux/amd64)
When I run
taskset -c 0-3 k6 run -e RPS=${REQRATE} -e USERS=${VU} -e STAGETIME=${TIME}s -e STAGE_VU1=${STAGEVU1} -e STAGE_VU2=${STAGEVU2} -e STAGE_VU3=${STAGEVU3} -e STAGE_VU4=${STAGEVU4} -e URL=$DOMAIN --no-usage-report --out influxdb=http://localhost:8186/k6 benchmark-scenarios-multi.js
/\ |‾‾| /‾‾/ /‾‾/
/\ / \ | |/ / / /
/ \/ \ | ( / ‾‾\
/ \ | |\ \ | (‾) |
/ __________ \ |__| \__\ \_____/ .io
execution: local
script: benchmark-scenarios-multi.js
output: InfluxDBv1 (http://localhost:8186)
scenarios: (100.00%) 2 scenarios, 1000 max VUs, 57s max duration (incl. graceful stop):
* constant_arrival_rate: 100.00 iterations/s for 5s (maxVUs: 0-1000, gracefulStop: 30s)
* ramping_vus: Up to 300 looping VUs for 20s over 4 stages (gracefulRampDown: 0s, startTime: 37s, gracefulStop: 30s)
I get
ERRO[0002] Error: only ramping-vus or ramping-arravial-rate supports stages, it is not possible to get a stage index on other executors.
running at i (webpack://k6-jslib-utils/./src/stages.js:92:8(61))
constantat u (webpack://k6-jslib-utils/./src/stages.js:114:26(8))
ramping_at file:///root/tools/k6/benchmark-scenarios-multi.js:142:2(8)
at native executor=constant-arrival-rate scenario=constant_arrival_rate source=stacktrace
scenarios: {
constant_arrival_rate: {
executor: 'constant-arrival-rate',
startTime: '0s',
rate: `${__ENV.RPS}`,
timeUnit: '1s',
duration: `${__ENV.STAGETIME}`,
preAllocatedVUs: `${__ENV.USERS}`,
maxVUs: 1000,
gracefulStop: '30s',
tags: { executor: 'constant-arrival-rate' },
},
ramping_vus: {
executor: 'ramping-vus',
startTime: `${__ENV.STAGETIME + 32}s`,
startVUs: `${__ENV.USERS}` || 0,
stages: [
{ duration: `${__ENV.STAGETIME}`, target: `${__ENV.STAGE_VU1}` },
{ duration: `${__ENV.STAGETIME}`, target: `${__ENV.STAGE_VU2}` },
{ duration: `${__ENV.STAGETIME}`, target: `${__ENV.STAGE_VU3}` },
{ duration: `${__ENV.STAGETIME}`, target: `${__ENV.STAGE_VU4}` },
],
gracefulRampDown: '0s',
gracefulStop: '30s',
tags: { executor: 'ramping-vus' },
},
},