JMeter 레퍼런스

JMeter 열기 (MAC)
open /usr/local/bin/jmeter
password
$2a$10$c/PwCYTZhxxKPoCCuqzMNulxF3VMel2BHVizwtbBNiONQkHgTb3lC
header
Content-Type application/json
/reservations/reservation-times/hairshops/1
{ "date": "${__RandomDate(,,2022-07-29,,)}", "reservationStartTime": "00:00", "reservationEndTime" : "23:59" }
/reservations/v1/reservation-time/hairshops/1
{ "date": "${__RandomDate(,,2022-07-29,,)}" }
/reservations
{ "name" : "사용자", "phoneNumber": "010-1234-5678", "date" : "${__RandomDate(,,2022-07-29,,)}", "time" : "1${__Random(0,9)}:${__Random(0,1)*3}0", "request" : "예쁘게 잘라주세요.", "paymentAmount" : 20000, "userId" : 1, "hairshopId" : 1, "designerId" : 1, "menuId" : 1 }
/reservations/v1
{ "name" : "사용자", "phoneNumber": "010-1234-5678", "date" : "${__RandomDate(,,2022-07-29,,)}", "time" : "1${__Random(0,9)}:${__Random(0,1)*3}0", "request" : "예쁘게 잘라주세요.", "paymentAmount" : 20000, "userId" : 1, "hairshopId" : 1, "designerId" : 1, "menuId" : 1 }
DataBase
insert into users (id, auth, email, password) values (1, "USER", "example@naver.com", "$2a$10$c/PwCYTZhxxKPoCCuqzMNulxF3VMel2BHVizwtbBNiONQkHgTb3lC"); insert into hairshop(id, name, phone_number, start_time, end_time, reservation_range, reservation_start_time, reservation_end_time, same_day_available, road_name_number, profile_img, introduction, user_id) values(1, '헤어샵', '010-1234-5678', '00:00', '23:30', '1', '00:00', '23:30', true, '주소', '이미지', '소개', 1); insert into designer (id, name, profile_img, introduction, position, hairshop_id) values (1, "designer", "image", "hello", "DESIGNER", 1); insert into designer (id, name, profile_img, introduction, position, hairshop_id) values (2, "designer", "image", "hello", "DESIGNER", 1); insert into designer (id, name, profile_img, introduction, position, hairshop_id) values (3, "designer", "image", "hello", "DESIGNER", 1); insert into designer (id, name, profile_img, introduction, position, hairshop_id) values (4, "designer", "image", "hello", "DESIGNER", 1); insert into designer (id, name, profile_img, introduction, position, hairshop_id) values (5, "designer", "image", "hello", "DESIGNER", 1); insert into menu(id, name, price, discount, gender, type, exposed_time, image, hairshop_id) values(1, '컽', 9999, 99, 'man', 'makeup', 30, '이미지', 1);
ReservationService
List<Designer> notReservedDesigners = designerRepository.findByHairshopId(hairshopId); for (Designer designer : notReservedDesigners) { if (!designers.contains(designer)) { responseDtos.add(ReservationConverter.toReservationTimeResponseDto( designer, times)); } }
DesignerRepository
List<Designer> findByHairshopId(Long hairshopId);
Jmeter 파일
CSV 파일
- Connection TimeOut 문제 (30초 이상 waiting 걸리면 에러나는 상황)
@GeneratedValue(strategy = GenerationType.AUTO)를 사용해서 문제 발생한 것
- 윈도우 환경에서 에러 java.net.BindException: Address already in use: connect가 나는 문제
성능테스트 List
참고한명이 한번에 100의 요청을 날리는 것과 100명이 동시에 1번씩 요청을 날리는 것은 동일
예약 가능시간 조회
예약률에 따른 최대 TPS 결과 (기준을 User or 횟수)
ㅤ | 0% | 25% | 50% | 75% | 100% |
동적 | 1464.4 | 576.0 | 356.6 | 255.8 | 201.7 |
정적 | 139.7 | 144.0 | 148.9 | 155.1 | 161.4 |
- 동적 계산 조회 테스트
- 스레드 수 → 40,000
- ramp up → 600
- loop → 4
- 평균 기대 TPS → 40,000/150(266.x)
- 실제 평균 TPS 250~270
- 로컬환경정리하고 테스트
- 환경을 똑같게 만들고 비교
- 길게 두고 테스트
![[New] 타일러팀](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fd0e59f54-3983-49c1-8f40-b92d6721d616%2Fkisspng-linux-fedora-unix-operating-systems-linux-5ab6faa3d2f047.949926281521941155864.png?table=block&id=8795517e-799e-41fd-9d58-bd2720695384&cache=v2)



