Hi,
Been playing with it a bit this morning and can sort of get it working using the rate command.
My scenario would be there are 10 users and each user needs to do two transactions (iterations) per minute.
export const options = {
vus: 10,
duration: '1m',
};
and then set the cycleTime to 30000 and call pacing_999 as described above I get
iteration_duration...: avg=30s min=29.99s med=30s max=30s p(90)=30s p(95)=30s
iterations...........: 20 0.333298/s
By using the following
export const options = {
scenarios: {
sc1: {
executor: 'constant-arrival-rate',
preAllocatedVUs: 10,
maxVUs: 10,
rate: 1,
duration: '1m',
},
},
}
I get a similar result
iteration_duration...: avg=30s min=30s med=30s max=30s p(90)=30s p(95)=30s
iterations...........: 20 0.2857/s
Which is good
and if I set the duration to 5m I get
iteration_duration...: avg=30s min=29.99s med=30s max=30s p(90)=30s p(95)=30s
iterations...........: 100 0.314458/s
However, I want to have say 75 iterations per 5 minutes there appears to be no way of lowering the rate under 1.
Using the pacing_999 code setting the cycleTime to 45000 would achieve this, well close to it anyway.
iteration_duration...: avg=45s min=44.99s med=45s max=45s p(90)=45s p(95)=45s
iterations...........: 70 0.222213/s
If I try to set the rate any lower than 1 or anything other than a full number I get any error
ERRO[0000] json: cannot unmarshal number 0.7 into Go struct field Options.scenarios of type int64
These are contrived examples at low rates which tend to skew the results, I will attempt to this on a much larger VU test over a much longer period and see I can get it working.
Might just be a matter of adjusting the number of VU’s up and down as well to meet transaction goals?