perf: K6 테스트 결과 P99 latency가 가장 높은 조회 API 5종 개선#117
Merged
Conversation
✅ 테스트 결과 for PRBuild: success 🧪 테스트 실행 with Gradle |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves batch read API latency by adding targeted indexes, switching horn-bugle recent reads to Slice-based pagination, extending cache TTL/warmup behavior, and adding K6 read-only performance tooling.
Changes:
- Added read-optimized indexes for horn-bugle and auction-history ranking queries.
- Changed horn-bugle recent DB reads from
PagetoSliceand added Slice response mapping. - Added weekly/horn-bugle cache warmups and K6 scenario/runner/reporting files.
Reviewed changes
Copilot reviewed 26 out of 27 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/test/java/until/the/eternity/metalwareinfo/application/service/MetalwareInfoServiceTest.java |
Import ordering cleanup. |
src/test/java/until/the/eternity/iteminfo/application/service/ItemInfoServiceTest.java |
Import ordering cleanup. |
src/test/java/until/the/eternity/common/util/SegongOptionParserTest.java |
Import ordering cleanup. |
src/test/java/until/the/eternity/auctionsearchoption/application/service/AuctionSearchOptionServiceTest.java |
Import ordering cleanup. |
src/test/java/until/the/eternity/auctionrealtime/application/service/fetcher/AuctionRealtimeFetcherTest.java |
Import ordering cleanup. |
src/test/java/until/the/eternity/auctionrealtime/application/service/AuctionRealtimeServiceTest.java |
Import ordering cleanup. |
src/test/java/until/the/eternity/auctionhistory/domain/service/AuctionHistoryDuplicateCheckerTest.java |
Import ordering cleanup. |
src/test/java/until/the/eternity/auctionhistory/application/service/persister/AuctionHistoryPersisterTest.java |
Import ordering cleanup. |
src/test/java/until/the/eternity/auctionhistory/application/service/fetcher/AuctionHistoryFetcherTest.java |
Import ordering cleanup. |
src/test/java/until/the/eternity/auctionhistory/application/service/AuctionHistoryServiceTest.java |
Import ordering cleanup. |
src/main/resources/db/migration/V31__add_batch_read_p99_tail_indexes.sql |
Adds conditional indexes for horn-bugle recent reads and all-time price ranking. |
src/main/java/until/the/eternity/statistics/service/WeeklyStatisticsService.java |
Adds post-commit asynchronous weekly cache warmup. |
src/main/java/until/the/eternity/hornBugle/infrastructure/persistence/HornBugleRepositoryPortImpl.java |
Wires new Slice-based recent horn-bugle repository methods. |
src/main/java/until/the/eternity/hornBugle/infrastructure/persistence/HornBugleJpaRepository.java |
Adds deterministic recent horn-bugle queries ordered by date/id. |
src/main/java/until/the/eternity/hornBugle/domain/repository/HornBugleRepositoryPort.java |
Extends repository port with Slice recent-read methods. |
src/main/java/until/the/eternity/hornBugle/domain/entity/HornBugleWorldHistory.java |
Declares new horn-bugle composite indexes. |
src/main/java/until/the/eternity/hornBugle/application/service/HornBugleService.java |
Uses Slice for non-keyword horn-bugle database search. |
src/main/java/until/the/eternity/hornBugle/application/scheduler/HornBugleScheduler.java |
Warms recent horn-bugle caches after scheduler completion. |
src/main/java/until/the/eternity/config/RedisConfig.java |
Increases weekly statistics cache TTL. |
src/main/java/until/the/eternity/common/response/PageResponseDto.java |
Adds Slice overload for page response construction. |
src/main/java/until/the/eternity/common/response/PageMeta.java |
Adds Slice-derived metadata construction. |
src/main/java/until/the/eternity/auctionhistory/domain/entity/AuctionHistory.java |
Declares auction-history price/buy-id ranking index. |
k6/scenarios/batch_readonly_portfolio.js |
Adds K6 read-only API portfolio scenario and report generation. |
k6/run-batch-readonly.sh |
Adds target/profile-based K6 runner with timestamped outputs. |
k6/results/.gitkeep |
Keeps the K6 results directory in Git. |
k6/README.md |
Documents K6 targets, profiles, output structure, and commands. |
.gitignore |
Ignores generated K6 results while retaining .gitkeep. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+26
to
+32
| public static PageMeta of(Slice<?> slice) { | ||
| int currentPage = slice.getNumber() + 1; | ||
| int totalPages = currentPage + (slice.hasNext() ? 1 : 0); | ||
| long totalElements = | ||
| slice.getPageable().getOffset() | ||
| + slice.getNumberOfElements() | ||
| + (slice.hasNext() ? 1 : 0); |
| PRE_ALLOCATED_VUS=${PRE_ALLOCATED_VUS} MAX_VUS=${MAX_VUS} \\ | ||
| REPORT_MD=${REPORT_MD} \\ | ||
| REPORT_JSON=${REPORT_JSON} \\ | ||
| k6 run performance/k6/scenarios/batch_readonly_portfolio.js |
Comment on lines
+10
to
+11
| const REPORT_MD = __ENV.REPORT_MD || 'k6/results/manual/batch_read_api_performance_report.md'; | ||
| const REPORT_JSON = __ENV.REPORT_JSON || 'k6/results/manual/batch_read_api_performance_summary.json'; |
Comment on lines
+120
to
+129
| for (WeeklyStatisticsWarmupTarget target : weeklyStatisticsWarmupTargets()) { | ||
| itemWeeklyStatisticsReadService.search( | ||
| target.itemName(), | ||
| target.subCategory(), | ||
| target.topCategory(), | ||
| weeklyStart, | ||
| end); | ||
| topCategoryWeeklyStatisticsReadService.search( | ||
| target.topCategory(), weeklyStart, end); | ||
| } |
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.
📋 상세 설명
📊 체크리스트
이슈 미등록