Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
seolys committed Apr 2, 2023
1 parent dd8e61f commit 9b21f52
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# idea
.idea
.DS_Store
.temp

# Compiled class file
*.class

Expand Down
9 changes: 9 additions & 0 deletions 01_first_script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import http from 'k6/http';
import { sleep } from 'k6';

// k6 run 01_first_script.js
export default function () {
http.get('https://test.k6.io');
// http.get('https://www.naver.com');
sleep(1);
}
35 changes: 35 additions & 0 deletions fastcampus/mysql/multi_scenario01.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import http from 'k6/http';

export let options = {
discardResponseBodies: false,
scenarios: {
first: {
exec: 'firstExec',
executor: 'constant-vus',
vus: 10,
duration: '30s',

// executor: 'ramping-vus',
// startVUs: 1,
// stages: [
// { duration: '30s', target: 10 },
// ],
},
second: {
exec: 'secondExec',
executor: 'constant-vus',
startTime: '10s',
vus: 10,
duration: '20s',
},
},
};


export function firstExec() {
http.get("http://localhost:8080/posts/members/3?page=0&size=500");
}

export function secondExec() {
http.get("http://localhost:8080/posts/members/3?page=0&size=500");
}
28 changes: 28 additions & 0 deletions fastcampus/mysql/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// init context: 모듈을 import 한다.
import http from 'k6/http';

// init context: k6 옵션을 정의한다.
export const options = {
// vus: 300,
stages: [
{ duration: '10s', target: 0 },
{ duration: '10s', target: 10 },
{ duration: '10s', target: 30 },
{ duration: '10s', target: 50 },
{ duration: '10s', target: 100 },
{ duration: '10s', target: 150 },
{ duration: '10s', target: 200 },
{ duration: '10s', target: 250 },
{ duration: '10s', target: 300 },
{ duration: '10s', target: 350 },
{ duration: '10s', target: 400 },
{ duration: '10s', target: 450 },
{ duration: '10s', target: 500 },
{ duration: '20s', target: 0 },
]
};


export default function() {
http.get("http://localhost:8080/posts/members/999?page=0&size=500");
}

0 comments on commit 9b21f52

Please sign in to comment.