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

Testing with dynamic analysis tool - k6 #54

Open
wants to merge 1 commit into
base: f24
Choose a base branch
from
Open
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
15 changes: 15 additions & 0 deletions k6-long-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import http from 'k6/http';
import { sleep } from 'k6';

export const options = {
stages: [
{ duration: '3m', target: 5000 }, // ramp-up to 5000 users
{ duration: '10m', target: 5000 }, // hold at 5000 users
{ duration: '3m', target: 0 }, // ramp-down to 0 users
],
};

export default function () {
http.get('http://localhost:4567/recent');
sleep(1);
}
15 changes: 15 additions & 0 deletions k6-short-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import http from 'k6/http';
import { sleep } from 'k6';

export const options = {
stages: [
{ duration: '2m', target: 300 }, // ramp-up to 300 users
{ duration: '5m', target: 300 }, // hold at 300 users
{ duration: '2m', target: 0 }, // ramp-down to 0
],
};

export default function () {
http.get('http://localhost:4567/recent');
sleep(1);
}
16 changes: 16 additions & 0 deletions k6-spike-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import http from 'k6/http';
import { sleep } from 'k6';

export const options = {
stages: [
{ duration: '2m', target: 15000 }, // spike to 15,000 users
{ duration: '1m', target: 0 }, // quick ramp-down to 0
{ duration: '2m', target: 15000 }, // another spike to 15,000 users
{ duration: '1m', target: 0 }, // ramp-down again
],
};

export default function () {
http.get('http://localhost:4567/recent');
sleep(1);
}
Loading