-
Notifications
You must be signed in to change notification settings - Fork 15
feat(be): contest user analytics dashboard #3358
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
Closed
Closed
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
…atistics function
…ub.com/skkuding/codedang into t2254-contest-problem-statistics-graph
|
✅ Syncing Preview App Succeeded Application: |
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.
Description
대회 종료 후 참가자별 상세 분석 데이터를 제공하는 Contest User Analytics Dashboard API 구현하였습니다. 해당 API들은 특정 대회의 전체 참가자 목록 조회 및 개별 참가자에 대한 세부 분석 데이터를 반환하여, 프론트엔드 데이터 시각화(패널티 분석, 문제 풀이 타임라인, 제출 기록 등)에 활용합니다.
<구현 기능>
1. 참가자 목록 조회 API
GET /contest/:contestId/statistics/users대회의 전체 참가자 목록을 반환합니다.
ICPC 공식 규칙에 따라 풀이 수(solved DESC) → 패널티(penalty ASC) 기준으로 정렬된 순위 정보를 제공합니다.
반환 데이터
적용된 로직
2. 참가자 상세 분석 API
GET /contest/:contestId/statistics/user/:userId특정 사용자의 대회 성과를 상세하게 조회할 수 있는 API입니다.
프론트의 “사용자 분석(User Analytics)” 탭에서 사용하는 핵심 데이터입니다.
반환 정보 구성
(1) 기본 사용자 정보
(2) penaltyAnalysis (문제별 패널티 분석)
해결된(isSolved = true) 문제만 포함하며, 각 문제에 대해 다음 정보를 반환합니다:
(3) timeline (문제 풀이 타임라인)
제출 기록을 기반으로 산출한 “문제 풀이 구간”을 반환합니다.
*제출 기반 추정이므로 실제 풀이 시간과 완벽히 일치하지 않을 수 있음.
(4) submissionHistory (모든 제출 내역)
사용자의 전체 제출 기록을 시간순으로 반환합니다.