Skip to content

Commit 63b81a8

Browse files
committed
refactor: 캐싱 적용후 성능테스트 진행하기 위한 클래스들 수정
1 parent f4d47b2 commit 63b81a8

File tree

3 files changed

+34
-10
lines changed

3 files changed

+34
-10
lines changed

docker-compose.perf.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ services:
7777
- pgdata:/var/lib/postgresql/data
7878
- ./docker/init.sql:/docker-entrypoint-initdb.d/init.sql
7979

80+
redis:
81+
image: redis:7.2
82+
container_name: log4u_redis
83+
ports:
84+
- "6379:6379"
85+
volumes:
86+
- redis_data:/data
87+
restart: always
88+
8089
mysql-exporter:
8190
image: prom/mysqld-exporter
8291
container_name: mysql-exporter
@@ -109,4 +118,4 @@ services:
109118
volumes:
110119
pgdata:
111120
mysql_data:
112-
121+
redis_data:

docker-compose.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,21 @@ services:
3030
networks:
3131
- log4u-net
3232

33+
redis:
34+
image: redis:7.2
35+
container_name: log4u_redis
36+
ports:
37+
- "6379:6379" # 외부에서 접근 가능하도록 포트 매핑
38+
volumes:
39+
- redis_data:/data # (선택) 영속 저장소
40+
networks:
41+
- log4u-net
42+
43+
3344
volumes:
3445
pgdata:
3546
mysql_data:
47+
redis_data:
3648

3749
networks:
3850
log4u-net:

performance-test.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ export const options = {
55
stages: [
66
{ duration: '1m', target: 50 }, // 1분 동안 VU 50명 유지
77
{ duration: '1m', target: 100 }, // 1분 동안 VU 100명 유지
8-
{ duration: '1m', target: 200 }, // 1분 동안 VU 200명 유지
9-
{ duration: '1m', target: 300 }, // 1분 동안 VU 300명 유지
10-
{ duration: '1m', target: 500 }, // 1분 동안 VU 500명 유지
8+
{ duration: '1m', target: 300 }, // 1분 동안 VU 200명 유지
9+
{ duration: '1m', target: 500 }, // 1분 동안 VU 300명 유지
10+
{ duration: '1m', target: 700 }, // 1분 동안 VU 500명 유지
11+
{ duration: '1m', target: 1000 }, // 1분 동안 VU 500명 유지
1112
{ duration: '1m', target: 0 }, // 점진적 종료
1213
],
1314
};
@@ -17,21 +18,23 @@ const BASE_URL = 'http://spring:8080';
1718
export default function () {
1819
// 강북구 고정 좌표
1920
const bounds = {
20-
south: 37.6335,
21-
north: 37.6535,
22-
west: 127.0011,
23-
east: 127.0211,
21+
south: 33.0,
22+
north: 39.5,
23+
west: 124.01,
24+
east: 131.0,
25+
zoom: 1
2426
};
2527

26-
const url = `${BASE_URL}/maps/diaries/marker?south=${bounds.south}&north=${bounds.north}&west=${bounds.west}&east=${bounds.east}`;
28+
const url = `${BASE_URL}/maps/diaries/cluster?south=${bounds.south}&north=${bounds.north}&west=${bounds.west}&east=${bounds.east}&zoom=${bounds.zoom}`;
2729

28-
group('Get Diary Markers (Gangbuk-gu fixed bounds)', () => {
30+
group('Get Diary Clusters (Gangbuk-gu fixed bounds)', () => {
2931
const res = http.get(url, {
3032
headers: {
3133
'Content-Type': 'application/json',
3234
},
3335
});
3436

37+
3538
check(res, {
3639
'status is 200': (r) => r.status === 200,
3740
});

0 commit comments

Comments
 (0)