refactor(性能测试): 开启异步方法处理测试结果
This commit is contained in:
parent
d1b110d2db
commit
1e2b9fe2e8
|
@ -10,6 +10,7 @@ import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration;
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
import org.springframework.boot.web.servlet.ServletComponentScan;
|
import org.springframework.boot.web.servlet.ServletComponentScan;
|
||||||
import org.springframework.context.annotation.PropertySource;
|
import org.springframework.context.annotation.PropertySource;
|
||||||
|
import org.springframework.scheduling.annotation.EnableAsync;
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
|
||||||
@SpringBootApplication(exclude = {
|
@SpringBootApplication(exclude = {
|
||||||
|
@ -23,6 +24,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
JmeterProperties.class
|
JmeterProperties.class
|
||||||
})
|
})
|
||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
|
@EnableAsync(proxyTargetClass = true)
|
||||||
//@PropertySource(value = {"file:c:\\opt\\metersphere\\conf\\metersphere.properties"}, encoding = "UTF-8", ignoreResourceNotFound = 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)
|
@PropertySource(value = {"file:/opt/metersphere/conf/metersphere.properties"}, encoding = "UTF-8", ignoreResourceNotFound = true)
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
package io.metersphere.commons.consumer;
|
package io.metersphere.commons.consumer;
|
||||||
|
|
||||||
import io.metersphere.base.domain.LoadTestReport;
|
import io.metersphere.base.domain.LoadTestReport;
|
||||||
|
import org.springframework.scheduling.annotation.Async;
|
||||||
|
|
||||||
public interface LoadTestFinishEvent {
|
public interface LoadTestFinishEvent {
|
||||||
|
@Async
|
||||||
void execute(LoadTestReport loadTestReport);
|
void execute(LoadTestReport loadTestReport);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue