Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP testing #511

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions current_season.js
Original file line number Diff line number Diff line change
@@ -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,
});
}
38 changes: 38 additions & 0 deletions launch_screen.js
Original file line number Diff line number Diff line change
@@ -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,
});
}
38 changes: 38 additions & 0 deletions matchday-widget.js
Original file line number Diff line number Diff line change
@@ -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,
});
}
38 changes: 38 additions & 0 deletions pusherino.js
Original file line number Diff line number Diff line change
@@ -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,
});
}
Loading