Skip to content

fix: 배지 사용량 집계에 cache_create 토큰 포함 (#23) - #25

Merged
kobenlys merged 2 commits into
mainfrom
develop
Oct 1, 2026
Merged

kobenlys merged 2 commits into
mainfrom
develop

Conversation

@kobenlys

@kobenlys kobenlys commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

🏷️ 작업 유형

  • 🐛 버그 픽스
  • ✨ 개발
  • 📝 문서 추가 및 수정
  • ♻️ 리팩터링
  • 🔧 ETC

📋 변경 사항

develop → main 반영: 배지 사용량을 input + cache_create + output으로 변경 (#24)

  • 원인: Claude는 새 입력의 약 97%를 cache_creation에 기록 → 기존 식(input + output)이 Claude 작업량을 약 15%만 집계
  • 적용: DailyTokenUsageRepository 쿼리 3개 (누적·레벨 / 일별·잔디·streak / Top 5)
  • 영향: 배포 후 Claude 사용자 누적 약 6.8배 상승(레벨 상승 가능), Codex 사용자 변화 없음. 배지 캐시로 최대 60분 뒤 반영
  • 변경 없음: CLI, DB 스키마·마이그레이션, 캐시 히트율

Closes #23

✅ 테스트

kobenlys and others added 2 commits October 1, 2026 01:19
- 사용량 = input + cache_create + output (cache_read만 제외)
- 누적·일별·Top 5 쿼리 3개에 같은 식 적용 (#23)
- Claude는 새 입력 대부분이 cache_create에 기록돼 과소 집계되던 문제 해결
- 통합테스트 추가(분할 무관·#23 재현·일별·지표 간 일치), 기존 기댓값 3개 갱신
…eate

fix: 배지 사용량 집계에 cache_create 토큰 포함 (#23)
@kobenlys kobenlys self-assigned this Oct 1, 2026
@kobenlys
kobenlys merged commit 2bbfe02 into main Oct 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Top 5 모델 순위에 캐시 토큰 포함 (Claude가 순위에서 누락됨)

1 participant