How I put a delay between VUs?

For this request I m using per-vu-iterations as a executer with 10 Vus. In createPackingRes body, I m calling pickingToteLabel as total VUs count in the parallel.But in this filed, I need a delay between VUs.When 10 parallel issues run this request I m getting db lock. I have to put a delay between VUs so that all requests does not sent at the same time with 10 users. How do I solve this? Is there any option ?

export const options = {
    summaryTimeUnit: "ms",
    scenarios: {
        Packing: {
            exec: "Packing",
            executor: "per-vu-iterations",
            vus: 10,
            iterations: 1,
        },
    },
};
let createPackingRes = Load.post(endpoints.PackingProcesses.createPackingProcessIfNotExists, tokenForOperator, JSON.stringify({
            pickingToteLabel: `${data[2][exec.vu.idInTest - 1]}`,
            packingAddressLabel: `${packingAddressLabel}`,
            kpiTrackingProcessId: `${kpiId}`
        })
        )

HI, @Yusuf
Maybe you should use function sleep() and inside function sleep() set random value?
This example

Hi Paul,this is a solution but not enough.If random time is same i will get error again

@PaulM your response give me a idea and solved .Thanks. Used below solution;

sleep(exec.vu.idInTest);

1 Like