feat(backend): add request-level performance metrics and reduce RAG top_k for latency optimization#59
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 개요
본 PR은 백엔드 처리 시간을 정량적으로 분석하기 위한 성능 계측 구조를 도입하고,
RAG 조회(top_k) 최적화를 통해 전체 요청 지연 시간을 개선하는 것을 목표로 합니다.
기존에는 체감 기반 개선이었으나,
이번 작업을 통해 요청 단위 및 구간별(latency span) 성능 분석이 가능하도록 구조를 정비하였습니다.
🔍 주요 변경 사항
1️⃣ 성능 계측 구조 도입
METRIC구조 로그 도입 (운영 모니터링용)이를 통해 실제 병목 구간을 수치로 확인할 수 있는 구조로 전환함.
2️⃣ RAG 조회 최적화
top_k값을 6 → 4로 축소📊 로컬 테스트 결과
분석 결과
🎯 기대 효과
🔜 다음 단계