refactor(性能测试): 开启异步方法处理测试结果

This commit is contained in:
Captain.B 2021-07-14 14:50:10 +08:00 committed by 刘瑞斌
parent d1b110d2db
commit 1e2b9fe2e8
2 changed files with 4 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.PropertySource;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication(exclude = {
@ -23,6 +24,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
JmeterProperties.class
})
@EnableScheduling
@EnableAsync(proxyTargetClass = true)
//@PropertySource(value = {"file:c:\\opt\\metersphere\\conf\\metersphere.properties"}, encoding = "UTF-8", ignoreResourceNotFound = true)
@PropertySource(value = {"file:/opt/metersphere/conf/metersphere.properties"}, encoding = "UTF-8", ignoreResourceNotFound = true)
public class Application {

View File

@ -1,7 +1,9 @@
package io.metersphere.commons.consumer;
import io.metersphere.base.domain.LoadTestReport;
import org.springframework.scheduling.annotation.Async;
public interface LoadTestFinishEvent {
@Async
void execute(LoadTestReport loadTestReport);
}