-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Milestone
Description
Labels: performance, quality
Milestone: Quality & Documentation
Assignee: @al1kite
목적
성능 개선 효과 측정 및 병목 지점 파악
벤치마크 항목
1. 파일 크기별 처리 시간
@State(Scope.Benchmark)
public class AnalysisBenchmark {
private AnalysisService service;
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MILLISECONDS)
public void benchmark_1MB_1000lines() {
var file = createFile(1_000);
service.analyze(file);
}
@Benchmark
public void benchmark_10MB_10000lines() {
var file = createFile(10_000);
service.analyze(file);
}
@Benchmark
public void benchmark_50MB_200000lines() {
var file = createFile(200_000);
service.analyze(file);
}
}2. 최적화 전후 비교
Before (StatisticsCalculator 6회 순회):
- 1k lines: 50ms
- 10k lines: 200ms
- 200k lines: 4000ms
After (단일 순회):
- 1k lines: 10ms (5배 빠름)
- 10k lines: 40ms (5배 빠름)
- 200k lines: 800ms (5배 빠름)
3. IP enrichment 병렬화
Before (순차):
- 10 IPs: 2000ms (10 × 200ms)
After (병렬):
- 10 IPs: 250ms (max(200ms) + overhead)
프로파일링
VisualVM / JProfiler
- CPU 사용률
- 메모리 사용량
- GC 활동
- 핫스팟 메서드
예상 결과
Hot Methods:
1. StatisticsCalculator.calculate() - 40%
2. CsvLogParser.parse() - 30%
3. IpInfoClient.getIpInfo() - 20%
작업 내용
- JMH 벤치마크 작성
- 파일 크기별 성능 측정
- 최적화 전후 비교
- 프로파일링 (VisualVM)
- 병목 지점 문서화
- README에 성능 표 추가
의존성
testImplementation("org.openjdk.jmh:jmh-core:1.37")
annotationProcessor("org.openjdk.jmh:jmh-generator-annprocess:1.37")Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels