feat(stats): 주요 통계 역대 최고 기록 제공 - #223
Merged
Merged
Conversation
DAU·WAU·MAU 등 13개 지표의 최고값과 달성 기간 모델 추가, PeakStatsStore 계약과 ConcurrentHashMap 기반 원자적 갱신 구현
13개 일·주·월 지표의 단일 PostgreSQL 집계와 KST 기간 경계·COMPLETED 상태·고유 사용자·V1/V2 합산 규칙 적용, ApplicationRunner 기반 메모리 적재 및 초기 집계 실패 격리
기존 일간·주간·월간 차트 집계 결과를 재사용해 메모리 최고 기록을 갱신하고, 최고값과 달성 기간을 ViewModel에 제공함
일간·주간·월간 13개 차트에 최고값과 달성 기간 배지를 추가하고, 현재 기간 및 기록 없음 상태를 공통 Thymeleaf fragment로 표시함
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.
📝 요약(Summary)
주요 변경사항
최고 기록 관리
PeakMetric,PeakStat,PeakStatsStore를 통해 지표와 저장 계약을 정의했습니다.ConcurrentHashMap.compute로 비교와 갱신을 원자적으로 처리합니다.초기 집계
실행 중 갱신
PeakStatsTracker에서 비교해 추가 전체 기간 쿼리 없이 기록을 갱신합니다.화면 표시
현재 기간과기록 없음상태를 구분합니다.검증
.\gradlew.bat compileJava통과InMemoryPeakStatsStoreTest8개 통과PeakStatsInitializerTest2개 통과PeakStatsTrackerTest5개 통과PeakStatsRepositoryTest2개 통과 (Testcontainers PostgreSQL).\gradlew.bat processResources통과StatsControllerTemplateTest4개 통과git diff --check통과참고 / 리스크
🔗 Related Issue
💬 공유사항
✅ PR Checklist
PR이 다음 요구 사항을 충족하는지 확인하세요.