<!--性能测试-->
<dependency>
<groupId>org.databene</groupId>
<artifactId>contiperf</artifactId>
<version>2.3.4</version>
<scope>test</scope>
</dependency>
@Rule
public ContiPerfRule contiPerfRule = new ContiPerfRule();
@Test()
@PerfTest(invocations = 100,threads = 10)
@Test
public void test(){
GetPersonCenterResq resq = new GetPersonCenterResq();
resq.setAppId("");
MallPersonalCenter center = personCenterService.getPersonCenter(resq);
log.info(JSON.toJSONString(center));
}
Thread Count: 10
Measured
(system) Required
Execution time: 1,830 ms
Throughput: 54 / s
Min. latency: 62 ms
Average latency: 179 ms
Median: 115 ms
90%: 224 ms
Max latency: 746 ms
throughput:吞吐要求n,要求每秒至少执行n个测试
average:平均执行时间n,要求平均执行时间不超过n毫秒
max:最大执行时间n,要求最大的执行时间不超过n毫秒
totalTime:总执行时间n,要求总的执行时间不超过n毫秒
median:50%平均执行时间n,要求所有执行的50%测试平均执行时间不超过n毫秒
percentile90:90%平均执行时间n,要求所有执行的90%测试平均执行时间不超过n毫秒
percentile95:95%平均执行时间n,要求所有执行的95%测试平均执行时间不超过n毫秒
percentile99:99%平均执行时间n,要求所有执行的99%测试平均执行时间不超过n毫秒
percentiles:表达式”a:n,b:m”,要求a%的测试不超过n毫秒,b%的测试不超过m毫秒