import { chessUserJourney } from '../scenarios/chessUserScenario.js'; import { thresholds } from '../config.js'; const START_USERS = parseInt(__ENV.START_USERS || '2', 10); const USERS_INCREMENT = parseInt(__ENV.USERS_INCREMENT || '2', 10); const STEPS = parseInt(__ENV.STEPS || '2', 10); const STEP_DURATION = parseInt(__ENV.STEP_DURATION || '30', 10); const RAMP_DURATION = parseInt(__ENV.RAMP_DURATION || '10', 10); const stages = []; let currentUsers = START_USERS; for (let i = 0; i < STEPS; i++) { // Ramp up stages.push({ duration: `${RAMP_DURATION}s`, target: currentUsers, }); // Hold at level stages.push({ duration: `${STEP_DURATION}s`, target: currentUsers, }); currentUsers += USERS_INCREMENT; } export const options = { stages, thresholds, }; export default function () { chessUserJourney(); }