사용자 도구

사이트 도구


java:junit:contiperf

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
java:junit:contiperf [2015/11/26 19:55]
kwon37xi
java:junit:contiperf [2016/04/22 08:26] (현재)
kwon37xi [Bug]
줄 1: 줄 1:
 ====== ContiPerf ====== ====== ContiPerf ======
   * [[http://databene.org/contiperf|ContiPerf 2]] 성능 테스트   * [[http://databene.org/contiperf|ContiPerf 2]] 성능 테스트
 +  * [[http://mvnrepository.com/artifact/org.databene/contiperf|ContiPerf Maven Repository]]
   * [[http://blog.javabenchmark.org/2013/03/continuous-performance-and-junit-with.html|Java Benchmark: Continuous Performance and JUnit with ContiPerf]]   * [[http://blog.javabenchmark.org/2013/03/continuous-performance-and-junit-with.html|Java Benchmark: Continuous Performance and JUnit with ContiPerf]]
  
줄 8: 줄 9:
    
     @Rule     @Rule
-    public ContiPerfRule = new ContiPerfRule();+    public ContiPerfRule contiPerfRule = new ContiPerfRule();
            
     @Test     @Test
줄 19: 줄 20:
 } }
 </code> </code>
- 
-===== @PerfTest 옵션들 ===== 
-  * ''invocations'' : 테스트의 총 호출 횟수 
-  * ''threads'' : 쓰레드 갯수 
-  * ''rampup'' : 최초에는 1개 쓰레드로 시작해 rampup 시간(ms)가 지날 때 마다 쓰레드 한개씩 증가시켜 최종 ''threads''갯수까지 증가시킨다. 
-  * ''duration'' : 전체 쓰레드갯수가 꽉찬 상태로 테스트를 진행할 시간(ms). ''invocations''과 함께 안사용하는것이 맞을 듯. 
-  * ''warmup'' : 지정된 시간(ms)가 지난 후 부터 성능 측정을 하라는 의미. 보통은 ''rampup''시간이 다지나 쓰레드가 꽉차는 시간(''(rampup -1) * threads'')을 지정한다. 그러면 rampup 시간을 제외한 Full Thread로 작동한 시간에 대해서만 측정한다. 
- 
-===== 임시 작동 중단 ===== 
-  * 시스템 프라퍼티 ''contiperf.active=false''지정. 
-  * Maven <code sh> 
-mvn test -DargLine="-Dcontiperf.active=false" 
-</code> 
- 
- 
  
 ===== 테스트 코드 작동구조 ===== ===== 테스트 코드 작동구조 =====
줄 54: 줄 40:
 after() after()
 </code> </code>
 +
 +===== @PerfTest 옵션들 =====
 +  * ''invocations'' : 테스트의 총 호출 횟수
 +  * ''threads'' : 쓰레드 갯수
 +  * ''rampup'' : 최초에는 1개 쓰레드로 시작해 rampup 시간(ms)가 지날 때 마다 쓰레드 한개씩 증가시켜 최종 ''threads''갯수까지 증가시킨다.
 +  * ''duration'' : 전체 쓰레드갯수가 꽉찬 상태로 테스트를 진행할 시간(ms). ''invocations''과 함께 안사용하는것이 맞을 듯.
 +  * ''warmup'' : 지정된 시간(ms)가 지난 후 부터 성능 측정을 하라는 의미. 보통은 ''rampup''시간이 다지나 쓰레드가 꽉차는 시간(''(rampup -1) * threads'')을 지정한다. 그러면 rampup 시간을 제외한 Full Thread로 작동한 시간에 대해서만 측정한다.
 +  * ''timer'' : 테스트 호출 사이사이마다 사용자 인터랙션 하듯이 잠시간의 중지시간 주기<code java>
 +timer = RandomTimer.class, timerParams = { 30, 80 }
 +// ConstantTimer, RandomTimer, CumulatedTimer
 +</code>
 +
 +===== @Required : 테스트 성공 조건 기술 =====
 +  * ''@Required(throughput = 20)'' : Requires to have at least 20 test executions per second
 +  * ''@Required(average = 50)'' Requires an average execution time of not more than 50 milliseconds
 +  * ''@Required(median = 45)'' : Requires that 50% of all executions do not take longer than 45 milliseconds
 +  * ''@Required(max = 2000)'' : Requires that no invocation takes more than 2000 milliseconds (2 seconds)
 +  * ''@Required(totalTime = 5000)'' : Requires that the sum of all execution times is not more than 5000 milliseconds (5 seconds)
 +  * ''@Required(percentile90 = 3000)'' : Requires that 90% of all executions do not take longer than 3000 milliseconds
 +  * ''@Required(percentile95 = 5000)'' : Requires that 95% of all executions do not take longer than 5000 milliseconds
 +  * ''@Required(percentile99 = 10000)'' : Requires that 99% of all executions do not take longer than 10000 milliseconds
 +  * ''@Required(percentiles = "66:200,96:500")'' : Requires that 66% of all executions do not take longer than 200 milliseconds and 96% of all executions do not take longer than 500 milliseconds 
 +
 +===== 임시 작동 중단 =====
 +  * 시스템 프라퍼티 ''contiperf.active=false''지정.
 +  * Maven <code sh>
 +mvn test -DargLine="-Dcontiperf.active=false"
 +</code>
 +
 +===== Bug =====
 +<code>
 +java.lang.NoSuchFieldException: fNext
 +</code>
 +JUnit 최신 버전과 안 맞아서 생기는 오류. JUnit 버전을 다운그레이드(4.11 이하) 할 것.
 +
java/junit/contiperf.1448537102.txt.gz · 마지막으로 수정됨: 2015/11/26 19:55 저자 kwon37xi