refactor: 초기 스파이크 방지를 위해 환경 설정용 테스트 API는 로컬에서 처리 & 성능 테스트 VU 가변 -> 고정 변경

This commit is contained in:
이상진 2025-10-15 11:20:53 +09:00
parent 4ced6ad3c3
commit 22163f8392
2 changed files with 5 additions and 8 deletions

View File

@ -32,7 +32,7 @@ export function maxIterations() {
export function fetchUsers() { export function fetchUsers() {
const userCount = Math.round(maxIterations() * 0.5) const userCount = Math.round(maxIterations() * 0.5)
const userAccountRes = http.get(`${BASE_URL}/tests/users?count=${userCount}`) const userAccountRes = http.get(`http://localhost:8080/tests/users?count=${userCount}`)
if (userAccountRes.status !== 200) { if (userAccountRes.status !== 200) {
throw new Error('users 조회 실패') throw new Error('users 조회 실패')
@ -42,7 +42,7 @@ export function fetchUsers() {
} }
export function fetchStores() { export function fetchStores() {
const storeIdListRes = http.get(`${BASE_URL}/tests/stores`) const storeIdListRes = http.get(`http://localhost:8080/tests/stores`)
if (storeIdListRes.status !== 200) { if (storeIdListRes.status !== 200) {
throw new Error('stores 조회 실패') throw new Error('stores 조회 실패')

View File

@ -15,13 +15,10 @@ export const options = {
scenarios: { scenarios: {
user_reservation: { user_reservation: {
executor: 'ramping-vus', executor: 'ramping-vus',
startVUs: 0, startVUs: 1500,
stages: [ stages: [
{ duration: '3m', target: 500 }, { duration: '10m', target: 1500 },
{ duration: '2m', target: 1000 }, { duration: '1m', target: 0 }
{ duration: '2m', target: 1500 },
{ duration: '3m', target: 1500 },
{ duration: '3m', target: 0 },
] ]
} }
}, },