diff --git a/current_season.js b/current_season.js new file mode 100644 index 00000000..f0e948b5 --- /dev/null +++ b/current_season.js @@ -0,0 +1,38 @@ +import http from 'k6/http'; +import { check } from 'k6'; + +export const options = { + discardResponseBodies: true, + + scenarios: { + contacts: { + executor: 'ramping-arrival-rate', + startRate: 300, + timeUnit: '1m', + preAllocatedVUs: 1000, + maxVUs: 5000, // Allow scaling to handle peaks dynamically + + stages: [ + // It should start 300 iterations per `timeUnit` for the first minute. + { target: 255, duration: '1m' }, + + // It should linearly ramp-up to starting 600 iterations per `timeUnit` over the following two minutes. + { target: 400, duration: '4m' }, + + // It should continue starting 600 iterations per `timeUnit` for the following four minutes. + { target: 757, duration: '5m' }, + + // It should linearly ramp-down to starting 60 iterations per `timeUnit` over the last two minute. + { target: 0, duration: '2m' }, + ], + }, + }, +}; + + +export default function () { + const result = http.get('https://api.clubplatform.de/api/clubs/2/launch_screen?auth_token=eXupJhEwXygQFs-hKyv7'); + check(result, { + 'http response status code is 200': result.status === 200, + }); +} \ No newline at end of file diff --git a/launch_screen.js b/launch_screen.js new file mode 100644 index 00000000..d48c19d6 --- /dev/null +++ b/launch_screen.js @@ -0,0 +1,38 @@ +import http from 'k6/http'; +import { check } from 'k6'; + +export const options = { + discardResponseBodies: true, + + scenarios: { + contacts: { + executor: 'ramping-arrival-rate', + startRate: 3, + timeUnit: '1m', + preAllocatedVUs: 100, + maxVUs: 1000, + + stages: [ + // It should start 300 iterations per `timeUnit` for the first minute. + { target: 3, duration: '1m' }, + + // It should linearly ramp-up to starting 600 iterations per `timeUnit` over the following two minutes. + { target: 10, duration: '4m' }, + + // It should continue starting 600 iterations per `timeUnit` for the following four minutes. + { target: 757, duration: '5m' }, + + // It should linearly ramp-down to starting 60 iterations per `timeUnit` over the last two minute. + { target: 0, duration: '2m' }, + ], + }, + }, +}; + + +export default function () { + const result = http.get('https://api.clubplatform.de/api/clubs/2/launch_screen?auth_token=eXupJhEwXygQFs-hKyv7'); + check(result, { + 'http response status code is 200': result.status === 200, + }); +} \ No newline at end of file diff --git a/matchday-widget.js b/matchday-widget.js new file mode 100644 index 00000000..0ce6530f --- /dev/null +++ b/matchday-widget.js @@ -0,0 +1,38 @@ +import http from 'k6/http'; +import { check } from 'k6'; + +export const options = { + discardResponseBodies: true, + + scenarios: { + contacts: { + executor: 'ramping-arrival-rate', + startRate: 300, + timeUnit: '1m', + preAllocatedVUs: 2000, + maxVUs: 10000, // Maximum VUs to allow dynamic scaling if needed + + stages: [ + // It should start 300 iterations per `timeUnit` for the first minute. + { target: 100, duration: '1m' }, + + // It should linearly ramp-up to starting 600 iterations per `timeUnit` over the following two minutes. + { target: 2700, duration: '4m' }, + + // It should continue starting 600 iterations per `timeUnit` for the following four minutes. + { target: 6000, duration: '5m' }, + + // It should linearly ramp-down to starting 60 iterations per `timeUnit` over the last two minute. + { target: 0, duration: '2m' }, + ], + }, + }, +}; + + +export default function () { + const result = http.get('https://api.clubplatform.de/api/clubs/2/launch_screen?auth_token=eXupJhEwXygQFs-hKyv7'); + check(result, { + 'http response status code is 200': result.status === 200, + }); +} \ No newline at end of file diff --git a/pusherino.js b/pusherino.js new file mode 100644 index 00000000..9200168e --- /dev/null +++ b/pusherino.js @@ -0,0 +1,38 @@ +import http from 'k6/http'; +import { check } from 'k6'; + +export const options = { + discardResponseBodies: true, + + scenarios: { + contacts: { + executor: 'ramping-arrival-rate', + startRate: 300, + timeUnit: '1m', + preAllocatedVUs: 3000, + maxVUs: 15000, // Maximum VUs for scaling up as needed + + stages: [ + // It should start 300 iterations per `timeUnit` for the first minute. + { target: 350, duration: '1m' }, + + // It should linearly ramp-up to starting 600 iterations per `timeUnit` over the following two minutes. + { target: 2500, duration: '4m' }, + + // It should continue starting 600 iterations per `timeUnit` for the following four minutes. + { target: 7300, duration: '5m' }, + + // It should linearly ramp-down to starting 60 iterations per `timeUnit` over the last two minute. + { target: 0, duration: '2m' }, + ], + }, + }, +}; + + +export default function () { + const result = http.get('https://api.clubplatform.de/api/clubs/2/launch_screen?auth_token=eXupJhEwXygQFs-hKyv7'); + check(result, { + 'http response status code is 200': result.status === 200, + }); +} \ No newline at end of file