-
Notifications
You must be signed in to change notification settings - Fork 17
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
Query Counter (aka. N+1 Detector) 를 통한 API별 쿼리 정보 정리 #572
Conversation
📝 Jacoco Test Coverage
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
잘 보고 갑니다 + 1. dev에 머지해서 보자
if (JDBC_QUERY_METHOD.contains(method.getName())) { | ||
final long startTime = System.currentTimeMillis(); | ||
final Object result = invocation.proceed(); | ||
final long endTime = System.currentTimeMillis(); | ||
|
||
loggingForm.addQueryTime(endTime - startTime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이런 거 모니터링은 보통 ms단위로 보나요?
0.002s 처럼 보는 경우는 별로 없으려나? 보통 ms정도만 소요될테니까?
저는 3. 이 브랜치를 dev 서버에 배포해서 확인하자 한표하겠습니다. |
49bbe37
to
1687ba1
Compare
protected void afterRequest(@NonNull final HttpServletRequest request, @NonNull final String message) { | ||
logger.info(message); | ||
// logger.info(message); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이거 데브에 머지할거면 제가 한거지만 지워주시면 감사하겠습니다 ? (그 때 테스트하려고 잠깐 주석으로 넣어놓은거라 ㅎㅎ)
그리고 프로메테우스 로깅 제외하는 것도 넣으면 좋을거 같아요 ...
if (!message.contains("prometheus")) {
logger.info(message);
}
쿼카 PR에서 반영안해도 되고, 로깅 PR에서 반영되도 좋을거 같지만? 이것도 기록 남기기용으로 남깁니다 ~
* Query Counter (aka. N+1 Detector) 를 통한 API별 쿼리 정보 정리 (#572) * feat: N+1 detector 적용 * feat: AOP 스프링 빈 등록 * chore: rebase develop * chore: p6spy 재적용 * refactor: info-appender logging 패턴 수정 * refactor: info-appender logging 패턴 개행 추가 * refactor: 패키지 위치 및 네이밍 변경 --------- Co-authored-by: mcodnjs <[email protected]> * feat: ts-loader -> esbuild-loader 마이그레이션 * refactor: fork-ts-checker-webpack-plugin 동작 문제 수정 --------- Co-authored-by: 신종화 <[email protected]> Co-authored-by: mcodnjs <[email protected]>
* refactor:아이템추가 모달 백드랍 클릭해도 닫히지 않게 함 * refactor: 커뮤니티여행 아이템 상세정보 줄바꿈 적용 * refactor:모바일 모달에서 '확인버튼' 항상 화면에 보이도록 설정 * feat:커뮤니티 여행, 작성자 본인일 경우 수정페이지 이동버튼 * refactor: 뱃지높이, 타이틀 너비 조정 * refactor: 쿼리별 캐싱시간 설정 * fix: 여행정보 수정시 바로 반영되도록 tripData주입받음 * refactor: expense페이지, isshared대신 tripType으로 상태변경 * feat:여행정보수정 이미지 업로드시 버튼 클릭 불가능 * chore:불필요한 라인 제거, 절대경로수정 * chore: mock data 원상복귀(테스트 실패로인한) * Query Counter (aka. N+1 Detector) 를 통한 API별 쿼리 정보 정리 (#572) * feat: N+1 detector 적용 * feat: AOP 스프링 빈 등록 * chore: rebase develop * chore: p6spy 재적용 * refactor: info-appender logging 패턴 수정 * refactor: info-appender logging 패턴 개행 추가 * refactor: 패키지 위치 및 네이밍 변경 --------- Co-authored-by: mcodnjs <[email protected]> * feat: ts-loader -> esbuild-loader 마이그레이션 * refactor: fork-ts-checker-webpack-plugin 동작 문제 수정 * Member 탈퇴에 따른 엔티티 Soft Delete 처리 성능 개선 (#687) * feat: memberId로 tripId 리스트 반환하는 기능 추가 * feat: tripId 리스트로 dayLogId 리스트 반환하는 기능 추가 * feat: dayLogId 리스트로 itemId 리스트 반환하는 기능 추가 * refactor: itemId, placeId, expenseId를 가진 DTO 리스트 반환하도록 변경 * refactor: memberId에 따른 엔티티 status 변경 및 refreshToken 삭제 성능 개선 * refactor: repository 구현체 패키지 변경 * refactor: SharedTrip, PublishedTrip도 함께 업데이트되도록 변경 * refactor: event 적용 * refactor: 트랜잭션 분리 * refactor: `@Async`로 비동기 처리 * refactor: 메서드 분리 * test: AuthServiceIntegrationTest 수정 * test: MemberDeleteEventListener Mock Test 작성 * refactor: indent 변경 * refactor: final 추가 * refactor: event 관련 클래스 패키지 위치 변경 * refactor: SharedStatusType 위치 변경 * refactor: WriterResponse 위치 변경 * refactor: PublishedStatusType 위치 변경 * refactor: 백엔드 이미지로직 변경에 의한 코드 수정 * chore: 코드 컨벤션에 의한 코드 수정 * refactor: 테스트코드 문제 해결을 위한 코드 수정 * refactor: 테스트코드 문제로 인한 코드 리팩토링 * refactor: 불필요한 파일 제거 --------- Co-authored-by: dahyeee <[email protected]> Co-authored-by: 신종화 <[email protected]> Co-authored-by: mcodnjs <[email protected]> Co-authored-by: Dahye Yun <[email protected]>
* refactor:아이템추가 모달 백드랍 클릭해도 닫히지 않게 함 * refactor: 커뮤니티여행 아이템 상세정보 줄바꿈 적용 * refactor:모바일 모달에서 '확인버튼' 항상 화면에 보이도록 설정 * feat:커뮤니티 여행, 작성자 본인일 경우 수정페이지 이동버튼 * refactor: 뱃지높이, 타이틀 너비 조정 * refactor: 쿼리별 캐싱시간 설정 * fix: 여행정보 수정시 바로 반영되도록 tripData주입받음 * refactor: expense페이지, isshared대신 tripType으로 상태변경 * feat:여행정보수정 이미지 업로드시 버튼 클릭 불가능 * chore:불필요한 라인 제거, 절대경로수정 * chore: mock data 원상복귀(테스트 실패로인한) * Query Counter (aka. N+1 Detector) 를 통한 API별 쿼리 정보 정리 (#572) * feat: N+1 detector 적용 * feat: AOP 스프링 빈 등록 * chore: rebase develop * chore: p6spy 재적용 * refactor: info-appender logging 패턴 수정 * refactor: info-appender logging 패턴 개행 추가 * refactor: 패키지 위치 및 네이밍 변경 --------- Co-authored-by: mcodnjs <[email protected]> * feat: ts-loader -> esbuild-loader 마이그레이션 * refactor: fork-ts-checker-webpack-plugin 동작 문제 수정 * Member 탈퇴에 따른 엔티티 Soft Delete 처리 성능 개선 (#687) * feat: memberId로 tripId 리스트 반환하는 기능 추가 * feat: tripId 리스트로 dayLogId 리스트 반환하는 기능 추가 * feat: dayLogId 리스트로 itemId 리스트 반환하는 기능 추가 * refactor: itemId, placeId, expenseId를 가진 DTO 리스트 반환하도록 변경 * refactor: memberId에 따른 엔티티 status 변경 및 refreshToken 삭제 성능 개선 * refactor: repository 구현체 패키지 변경 * refactor: SharedTrip, PublishedTrip도 함께 업데이트되도록 변경 * refactor: event 적용 * refactor: 트랜잭션 분리 * refactor: `@Async`로 비동기 처리 * refactor: 메서드 분리 * test: AuthServiceIntegrationTest 수정 * test: MemberDeleteEventListener Mock Test 작성 * refactor: indent 변경 * refactor: final 추가 * refactor: event 관련 클래스 패키지 위치 변경 * refactor: SharedStatusType 위치 변경 * refactor: WriterResponse 위치 변경 * refactor: PublishedStatusType 위치 변경 * chore: conflict resolve * refactor: ItemRequest 필드 변화에 따른 변경사항 반영 * refactor: ItemUpdateRequest 필드 변화에 따른 변경사항 반영 * refactor: ImageNameParser 제거 * refactor: 메서드 파라미터 변경 * refactor: 테스트에서 사용하는 매개변수 url-> name 형식으로 변경 * refactor: ItemResponse 필드 변경 * refactor: Trip 대표이미지 url -> name으로 변경 --------- Co-authored-by: dahyeee <[email protected]> Co-authored-by: mcodnjs <[email protected]> Co-authored-by: dladncks1217 <[email protected]> Co-authored-by: Dahye Yun <[email protected]>
* Query Counter (aka. N+1 Detector) 를 통한 API별 쿼리 정보 정리 (#572) * feat: N+1 detector 적용 * feat: AOP 스프링 빈 등록 * chore: rebase develop * chore: p6spy 재적용 * refactor: info-appender logging 패턴 수정 * refactor: info-appender logging 패턴 개행 추가 * refactor: 패키지 위치 및 네이밍 변경 --------- Co-authored-by: mcodnjs <[email protected]> * feat: ts-loader -> esbuild-loader 마이그레이션 * refactor: fork-ts-checker-webpack-plugin 동작 문제 수정 --------- Co-authored-by: 신종화 <[email protected]> Co-authored-by: mcodnjs <[email protected]>
* refactor:아이템추가 모달 백드랍 클릭해도 닫히지 않게 함 * refactor: 커뮤니티여행 아이템 상세정보 줄바꿈 적용 * refactor:모바일 모달에서 '확인버튼' 항상 화면에 보이도록 설정 * feat:커뮤니티 여행, 작성자 본인일 경우 수정페이지 이동버튼 * refactor: 뱃지높이, 타이틀 너비 조정 * refactor: 쿼리별 캐싱시간 설정 * fix: 여행정보 수정시 바로 반영되도록 tripData주입받음 * refactor: expense페이지, isshared대신 tripType으로 상태변경 * feat:여행정보수정 이미지 업로드시 버튼 클릭 불가능 * chore:불필요한 라인 제거, 절대경로수정 * chore: mock data 원상복귀(테스트 실패로인한) * Query Counter (aka. N+1 Detector) 를 통한 API별 쿼리 정보 정리 (#572) * feat: N+1 detector 적용 * feat: AOP 스프링 빈 등록 * chore: rebase develop * chore: p6spy 재적용 * refactor: info-appender logging 패턴 수정 * refactor: info-appender logging 패턴 개행 추가 * refactor: 패키지 위치 및 네이밍 변경 --------- Co-authored-by: mcodnjs <[email protected]> * feat: ts-loader -> esbuild-loader 마이그레이션 * refactor: fork-ts-checker-webpack-plugin 동작 문제 수정 * Member 탈퇴에 따른 엔티티 Soft Delete 처리 성능 개선 (#687) * feat: memberId로 tripId 리스트 반환하는 기능 추가 * feat: tripId 리스트로 dayLogId 리스트 반환하는 기능 추가 * feat: dayLogId 리스트로 itemId 리스트 반환하는 기능 추가 * refactor: itemId, placeId, expenseId를 가진 DTO 리스트 반환하도록 변경 * refactor: memberId에 따른 엔티티 status 변경 및 refreshToken 삭제 성능 개선 * refactor: repository 구현체 패키지 변경 * refactor: SharedTrip, PublishedTrip도 함께 업데이트되도록 변경 * refactor: event 적용 * refactor: 트랜잭션 분리 * refactor: `@Async`로 비동기 처리 * refactor: 메서드 분리 * test: AuthServiceIntegrationTest 수정 * test: MemberDeleteEventListener Mock Test 작성 * refactor: indent 변경 * refactor: final 추가 * refactor: event 관련 클래스 패키지 위치 변경 * refactor: SharedStatusType 위치 변경 * refactor: WriterResponse 위치 변경 * refactor: PublishedStatusType 위치 변경 * refactor: 백엔드 이미지로직 변경에 의한 코드 수정 * chore: 코드 컨벤션에 의한 코드 수정 * refactor: 테스트코드 문제 해결을 위한 코드 수정 * refactor: 테스트코드 문제로 인한 코드 리팩토링 * refactor: 불필요한 파일 제거 --------- Co-authored-by: dahyeee <[email protected]> Co-authored-by: 신종화 <[email protected]> Co-authored-by: mcodnjs <[email protected]> Co-authored-by: Dahye Yun <[email protected]>
📄 Summary
저희 API가 왠만한건 다 auth 걸려 있어서 그냥 테스트 엔티티랑 컨트롤러 만들어서 실험해 봤는데 잘 나오네요

이제 두 가지 방법이 있습니다.
🙋🏻 More