优化监控数据的处理

This commit is contained in:
bryan.zhang
2017-11-23 15:27:08 +08:00
parent 07c0ab8b41
commit b02167cf4e
2 changed files with 49 additions and 28 deletions

View File

@@ -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();
}
}