feat: Added k6 performance tests
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { chessUserJourney } from '../scenarios/chessUserScenario.js';
|
||||
import { thresholds } from '../config.js';
|
||||
|
||||
const BASELINE_USERS = parseInt(__ENV.BASELINE_USERS || '2', 10);
|
||||
const BASELINE_DURATION = parseInt(__ENV.BASELINE_DURATION || '20', 10);
|
||||
const SPIKE_USERS = parseInt(__ENV.SPIKE_USERS || '15', 10);
|
||||
|
||||
export const options = {
|
||||
stages: [
|
||||
{ duration: `${BASELINE_DURATION}s`, target: BASELINE_USERS },
|
||||
{ duration: '1s', target: BASELINE_USERS + SPIKE_USERS },
|
||||
{ duration: '5s', target: BASELINE_USERS + SPIKE_USERS },
|
||||
{ duration: '1s', target: BASELINE_USERS },
|
||||
{ duration: `${BASELINE_DURATION}s`, target: BASELINE_USERS },
|
||||
],
|
||||
thresholds,
|
||||
};
|
||||
|
||||
export default function () {
|
||||
chessUserJourney();
|
||||
}
|
||||
Reference in New Issue
Block a user