mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-20 21:38:10 +08:00
优化监控数据的处理
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package com.thebeastshop.liteflow.test;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.junit.Test;
|
||||
@@ -20,7 +23,18 @@ public class TestWithSpringMain {
|
||||
|
||||
@Test
|
||||
public void test1() throws Exception {
|
||||
String response = flowExecutor.execute("chain2", "it's a request");
|
||||
System.out.println(response);
|
||||
ExecutorService executorService = Executors.newFixedThreadPool(10);
|
||||
|
||||
for(int i=0;i<100;i++){
|
||||
executorService.submit(new Thread(){
|
||||
@Override
|
||||
public void run() {
|
||||
String response = flowExecutor.execute("chain2", "it's a request");
|
||||
System.out.println(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
System.out.println("done!");
|
||||
System.in.read();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user