|
@@ -1,135 +1,100 @@
|
|
|
package com.nokia.domainb.capability.controller;
|
|
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
-import com.nokia.common.http.R;
|
|
|
-import com.nokia.domainb.dto.*;
|
|
|
-import com.nokia.domainb.util.Utils;
|
|
|
-import de.siegmar.fastcsv.reader.CsvReader;
|
|
|
-import de.siegmar.fastcsv.reader.CsvRow;
|
|
|
+import com.google.common.collect.Lists;
|
|
|
+import com.nokia.domainb.capability.config.TestConfig;
|
|
|
+import com.nokia.domainb.dto.RouteDTO;
|
|
|
import de.siegmar.fastcsv.writer.CsvWriter;
|
|
|
-import lombok.AllArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import okhttp3.ConnectionPool;
|
|
|
-import okhttp3.OkHttpClient;
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
|
-import org.springframework.boot.test.context.TestConfiguration;
|
|
|
-import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Import;
|
|
|
-import org.springframework.http.client.OkHttp3ClientHttpRequestFactory;
|
|
|
-import org.springframework.scheduling.concurrent.CustomizableThreadFactory;
|
|
|
+import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
|
|
|
+import org.springframework.util.StopWatch;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
import java.io.OutputStreamWriter;
|
|
|
-import java.nio.charset.StandardCharsets;
|
|
|
import java.nio.file.Files;
|
|
|
-import java.nio.file.Path;
|
|
|
import java.nio.file.Paths;
|
|
|
+import java.time.Instant;
|
|
|
import java.time.LocalDateTime;
|
|
|
-import java.util.Set;
|
|
|
-import java.util.concurrent.LinkedBlockingQueue;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+import java.util.concurrent.CompletableFuture;
|
|
|
+import java.util.concurrent.ScheduledThreadPoolExecutor;
|
|
|
import java.util.concurrent.ThreadPoolExecutor;
|
|
|
-import java.util.concurrent.TimeUnit;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+import java.util.stream.Stream;
|
|
|
|
|
|
@Slf4j
|
|
|
@SpringBootTest
|
|
|
-@Import(DomainControllerTest.ConcurrentTestConfig.class)
|
|
|
+@Import(TestConfig.class)
|
|
|
class DomainControllerTest {
|
|
|
- public static final int poolSize = 40;
|
|
|
/**
|
|
|
* 测试结果保存文件夹
|
|
|
*/
|
|
|
- public static final String TEST_DIR = "z:/";
|
|
|
+ public static final String TEST_DIR = "test/";
|
|
|
+ /**
|
|
|
+ * 数据文件路径
|
|
|
+ */
|
|
|
+ public static final String DATA_PATH = TEST_DIR + "data/10000.txt";
|
|
|
+
|
|
|
@Autowired
|
|
|
private RestTemplate template;
|
|
|
@Autowired
|
|
|
- private ThreadPoolExecutor executor;
|
|
|
-
|
|
|
- @TestConfiguration
|
|
|
- static class ConcurrentTestConfig {
|
|
|
- @Bean
|
|
|
- public RestTemplate template() {
|
|
|
- return new RestTemplate(new OkHttp3ClientHttpRequestFactory(new OkHttpClient().newBuilder()
|
|
|
- .connectionPool(new ConnectionPool(1000, 10, TimeUnit.MINUTES))
|
|
|
- .build()));
|
|
|
- }
|
|
|
-
|
|
|
- @Bean
|
|
|
- public ThreadPoolExecutor executor() {
|
|
|
- ThreadPoolExecutor executor = new ThreadPoolExecutor(poolSize, poolSize, 0L, TimeUnit.MILLISECONDS,
|
|
|
- new LinkedBlockingQueue<>(), new CustomizableThreadFactory("test-"));
|
|
|
- executor.prestartAllCoreThreads();
|
|
|
- return executor;
|
|
|
- }
|
|
|
- }
|
|
|
+ private ThreadPoolExecutor requestExecutor;
|
|
|
+ @Autowired
|
|
|
+ private ThreadPoolExecutor offerExecutor;
|
|
|
+ @Autowired
|
|
|
+ private ThreadPoolTaskScheduler scheduler;
|
|
|
|
|
|
/**
|
|
|
- * 欠费接口整合并发测试
|
|
|
+ * 路由查询并发测试
|
|
|
*/
|
|
|
@Test
|
|
|
- void testQryOweFee() {
|
|
|
- // 每个请求结果保存的路径
|
|
|
- String singlePath = TEST_DIR + "qryowefee/single/";
|
|
|
- // 合并结果保存的路径
|
|
|
- String resultPath = TEST_DIR + "qryowefee/";
|
|
|
+ void testRoute() {
|
|
|
+ // 测试环境地址
|
|
|
+ String url = "http://192.168.50.3:12091/domainB/api/route/";
|
|
|
+ // 正式环境地址
|
|
|
+// String url = "http://192.168.70.130:12091/domainB/api/route/";
|
|
|
+ // 结果保存的路径
|
|
|
+ String resultPath = TEST_DIR + "result/route/";
|
|
|
// 创建文件夹
|
|
|
try {
|
|
|
- Files.createDirectories(Paths.get(singlePath));
|
|
|
Files.createDirectories(Paths.get(resultPath));
|
|
|
} catch (IOException e) {
|
|
|
- e.printStackTrace();
|
|
|
+ log.error("创建文件夹失败: {}", e.getMessage(), e);
|
|
|
return;
|
|
|
}
|
|
|
- resultPath = resultPath + "欠费接口整合" + poolSize + "个线程8000条数据测试结果.csv";
|
|
|
- // 接口地址
|
|
|
- String url = "http://192.168.50.3:12091/domainB/api/acting/qryowefee/";
|
|
|
- Set<String> phones = Utils.readPhones();
|
|
|
- for (String t : phones) {
|
|
|
- QryowefeeDTO dto = new QryowefeeDTO("test", t);
|
|
|
- executor.submit(new Task(template, t, url, dto, singlePath));
|
|
|
- }
|
|
|
-
|
|
|
- // 等待所有任务执行结束
|
|
|
- while (executor.getActiveCount() > 0) {
|
|
|
- }
|
|
|
- mergeResult(phones, resultPath, singlePath);
|
|
|
+ resultPath = resultPath + "路由查询" + TestConfig.qps + "个线程10000条数据测试结果.csv";
|
|
|
+ request(url);
|
|
|
+ writeFile(resultPath);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 路由查询并发测试
|
|
|
+ * 欠费接口整合并发测试
|
|
|
*/
|
|
|
@Test
|
|
|
- void testRoute() {
|
|
|
- // 每个请求结果保存的路径
|
|
|
- String singlePath = TEST_DIR + "route/single/";
|
|
|
- // 合并结果保存的路径
|
|
|
- String resultPath = TEST_DIR + "route/";
|
|
|
+ void testQryOweFee() {
|
|
|
+ // 测试环境地址
|
|
|
+ String url = "http://192.168.50.3:12091/domainB/api/acting/qryowefee/";
|
|
|
+ // 正式环境地址
|
|
|
+// String url = "http://192.168.70.130:12091/domainB/api/acting/qryowefee/";
|
|
|
+ // 结果保存的路径
|
|
|
+ String resultPath = TEST_DIR + "qryowefee/";
|
|
|
+ resultPath = resultPath + "欠费接口整合" + TestConfig.qps + "个线程10000条数据测试结果.csv";
|
|
|
// 创建文件夹
|
|
|
try {
|
|
|
- Files.createDirectories(Paths.get(singlePath));
|
|
|
Files.createDirectories(Paths.get(resultPath));
|
|
|
} catch (IOException e) {
|
|
|
- e.printStackTrace();
|
|
|
+ log.error("创建文件夹失败: {}", e.getMessage(), e);
|
|
|
return;
|
|
|
}
|
|
|
- resultPath = resultPath + "路由查询" + poolSize + "个线程10000条数据测试结果.csv";
|
|
|
-// resultPath = resultPath + "路由查询" + poolSize + "个线程1000条数据测试结果.csv";
|
|
|
-// resultPath = resultPath + "路由查询" + poolSize + "个线程100条数据测试结果.csv";
|
|
|
- // 接口地址
|
|
|
- String url = "http://133.96.94.108:12091/domainB/api/route/";
|
|
|
- Set<String> phones = Utils.readPhones();
|
|
|
- for (String t : phones) {
|
|
|
- String[] a = t.split(",");
|
|
|
- String phoneNumber = a[0];
|
|
|
- RouteDTO dto = new RouteDTO("test", phoneNumber);
|
|
|
- executor.submit(new Task(template, phoneNumber, url, dto, singlePath));
|
|
|
- }
|
|
|
- // 等待所有任务执行结束
|
|
|
- while (executor.getActiveCount() > 0) {
|
|
|
- }
|
|
|
- mergeResult(phones, resultPath, singlePath);
|
|
|
+ resultPath = resultPath + "欠费接口整合" + TestConfig.qps + "个线程100条数据测试结果.csv";
|
|
|
+ request(url);
|
|
|
+ writeFile(resultPath);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -137,34 +102,22 @@ class DomainControllerTest {
|
|
|
*/
|
|
|
@Test
|
|
|
void testSa() {
|
|
|
- // 每个请求结果保存的路径
|
|
|
- String singlePath = TEST_DIR + "sa/single/";
|
|
|
- // 合并结果保存的路径
|
|
|
+ // 测试环境地址
|
|
|
+ String url = "http://192.168.50.3:12091/domainB/api/sa/";
|
|
|
+ // 正式环境地址
|
|
|
+// String url = "http://192.168.70.130:12091/domainB/api/sa/";
|
|
|
+ // 结果保存的路径
|
|
|
String resultPath = TEST_DIR + "sa/";
|
|
|
// 创建文件夹
|
|
|
try {
|
|
|
- Files.createDirectories(Paths.get(singlePath));
|
|
|
Files.createDirectories(Paths.get(resultPath));
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
return;
|
|
|
}
|
|
|
- resultPath = resultPath + "5GSA查询" + poolSize + "个线程10000条数据测试结果.csv";
|
|
|
-// resultPath = resultPath + "5GSA查询" + poolSize + "个线程1000条数据测试结果.csv";
|
|
|
-// resultPath = resultPath + "5GSA查询" + poolSize + "个线程100条数据测试结果.csv";
|
|
|
- // 接口地址
|
|
|
- String url = "http://133.96.94.108:12091/domainB/api/sa/";
|
|
|
- Set<String> phones = Utils.readPhones();
|
|
|
- for (String t : phones) {
|
|
|
- String[] a = t.split(",");
|
|
|
- String phoneNumber = a[0];
|
|
|
- SaDTO dto = new SaDTO("test", phoneNumber);
|
|
|
- executor.submit(new Task(template, phoneNumber, url, dto, singlePath));
|
|
|
- }
|
|
|
- // 等待所有任务执行结束
|
|
|
- while (executor.getActiveCount() > 0) {
|
|
|
- }
|
|
|
- mergeResult(phones, resultPath, singlePath);
|
|
|
+ resultPath = resultPath + "5GSA查询" + TestConfig.qps + "个线程10000条数据测试结果.csv";
|
|
|
+ request(url);
|
|
|
+ writeFile(resultPath);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -172,33 +125,22 @@ class DomainControllerTest {
|
|
|
*/
|
|
|
@Test
|
|
|
void testSaAndVolte() {
|
|
|
- // 每个请求结果保存的路径
|
|
|
- String singlePath = TEST_DIR + "saAndVolte/single/";
|
|
|
+ // 测试环境地址
|
|
|
+ String url = "http://192.168.50.3:12091/domainB/api/product/saAndVolte/";
|
|
|
+ // 正式环境地址
|
|
|
+// String url = "http://192.168.70.130:12091/domainB/api/product/saAndVolte/";
|
|
|
// 合并结果保存的路径
|
|
|
String resultPath = TEST_DIR + "saAndVolte/";
|
|
|
// 创建文件夹
|
|
|
try {
|
|
|
- Files.createDirectories(Paths.get(singlePath));
|
|
|
Files.createDirectories(Paths.get(resultPath));
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
return;
|
|
|
}
|
|
|
- resultPath = resultPath + "new功能查询" + poolSize + "个线程10000条数据测试结果.csv";
|
|
|
-// resultPath = resultPath + "功能查询" + poolSize + "个线程1000条数据测试结果.csv";
|
|
|
-// resultPath = resultPath + "功能查询" + poolSize + "个线程100条数据测试结果.csv";
|
|
|
- // 接口地址
|
|
|
- String url = "http://192.168.50.3:12091/domainB/api/product/saAndVolte/";
|
|
|
-// String url = "http://133.96.94.108:12091/domainB/api/product/saAndVolte/";
|
|
|
- Set<String> phones = Utils.readPhones();
|
|
|
- for (String t : phones) {
|
|
|
- SaAndVolteDTO dto = new SaAndVolteDTO("test", t);
|
|
|
- executor.submit(new Task(template, t, url, dto, singlePath));
|
|
|
- }
|
|
|
- // 等待所有任务执行结束
|
|
|
- while (executor.getActiveCount() > 0) {
|
|
|
- }
|
|
|
- mergeResult(phones, resultPath, singlePath);
|
|
|
+ resultPath = resultPath + "功能查询" + TestConfig.qps + "个线程10000条数据测试结果.csv";
|
|
|
+ request(url);
|
|
|
+ writeFile(resultPath);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -206,104 +148,110 @@ class DomainControllerTest {
|
|
|
*/
|
|
|
@Test
|
|
|
void testUserState() {
|
|
|
- // 每个请求结果保存的路径
|
|
|
- String singlePath = TEST_DIR + "userState/single/";
|
|
|
+ // 测试环境地址
|
|
|
+ String url = "http://192.168.50.3:12091/domainB/api/threePart/userState/";
|
|
|
+ // 正式环境地址
|
|
|
+// String url = "http://192.168.70.130:12091/domainB/api/threePart/userState/";
|
|
|
// 合并结果保存的路径
|
|
|
String resultPath = TEST_DIR + "userState/";
|
|
|
// 创建文件夹
|
|
|
try {
|
|
|
- Files.createDirectories(Paths.get(singlePath));
|
|
|
Files.createDirectories(Paths.get(resultPath));
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
return;
|
|
|
}
|
|
|
- resultPath = resultPath + "用户资料三户返回" + poolSize + "个线程7月1-24日移网质量投诉业务号码测试结果.csv";
|
|
|
- // 接口地址
|
|
|
- String url = "http://133.96.94.108:12091/domainB/api/threePart/userState/";
|
|
|
- Set<String> phones = Utils.readPhones();
|
|
|
- for (String t : phones) {
|
|
|
- String[] a = t.split(",");
|
|
|
- String phoneNumber = a[0];
|
|
|
- UserStateDTO dto = new UserStateDTO("test", phoneNumber);
|
|
|
- executor.submit(new Task(template, phoneNumber, url, dto, singlePath));
|
|
|
- }
|
|
|
- // 等待所有任务执行结束
|
|
|
- while (executor.getActiveCount() > 0) {
|
|
|
- }
|
|
|
- mergeResult(phones, resultPath, singlePath);
|
|
|
+ resultPath = resultPath + "用户资料三户返回" + TestConfig.qps + "个线程10000条数据测试结果.csv";
|
|
|
+ request(url);
|
|
|
+ writeFile(resultPath);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 合并结果
|
|
|
- *
|
|
|
- * @param phones 手机列表
|
|
|
- * @param resultPath 合并结果保存路径
|
|
|
- * @param singlePath 单个结果保存路径
|
|
|
+ * 并发请求
|
|
|
+ * @param url 接口地址
|
|
|
*/
|
|
|
- private void mergeResult(Set<String> phones, String resultPath, String singlePath) {
|
|
|
- try(OutputStreamWriter osw = new OutputStreamWriter(Files.newOutputStream(Paths.get(resultPath)),
|
|
|
- StandardCharsets.UTF_8);
|
|
|
- CsvWriter csvWriter = CsvWriter.builder().build(osw);
|
|
|
- ) {
|
|
|
- csvWriter.writeRow("入参", "时间", "调用时长", "结果");
|
|
|
- for (String phone : phones) {
|
|
|
-// phone = phone.split(",")[0];
|
|
|
- Path path = Paths.get(singlePath + phone + ".csv");
|
|
|
- try (CsvReader csvReader = CsvReader.builder().build(path, StandardCharsets.UTF_8)) {
|
|
|
- for (CsvRow row : csvReader) {
|
|
|
- csvWriter.writeRow(row.getField(0), row.getField(1), row.getField(2),
|
|
|
- row.getField(3));
|
|
|
- }
|
|
|
- } catch (IOException e) {
|
|
|
- log.error("{} -> {}", phone, e.getMessage(), e);
|
|
|
- }
|
|
|
+ private void request(String url) {
|
|
|
+ try(Stream<String> lines = Files.lines(Paths.get(DATA_PATH))) {
|
|
|
+ // 去重
|
|
|
+ List<String> list = lines.distinct().collect(Collectors.toList());
|
|
|
+ // 切分数据,每秒 qps 个请求
|
|
|
+ List<List<String>> parts = Lists.partition(list, TestConfig.qps);
|
|
|
+ // 任务执行时间
|
|
|
+ Instant startTime = Instant.now();
|
|
|
+ for (List<String> p : parts) {
|
|
|
+ startTime = startTime.plusSeconds(1);
|
|
|
+ // 添加定时任务
|
|
|
+ scheduler.schedule(() -> {
|
|
|
+ // 并发请求
|
|
|
+ CompletableFuture.allOf(p.stream().map(t ->
|
|
|
+ CompletableFuture.runAsync(() -> {
|
|
|
+ RouteDTO dto = new RouteDTO("test", t);
|
|
|
+ Object r;
|
|
|
+ LocalDateTime now = LocalDateTime.now();
|
|
|
+ StopWatch stopWatch = new StopWatch();
|
|
|
+ stopWatch.start();
|
|
|
+ try {
|
|
|
+ r = template.postForObject(url, dto, Object.class);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
+ r = e.getMessage();
|
|
|
+ }
|
|
|
+ stopWatch.stop();
|
|
|
+ List<String> data = new ArrayList<>();
|
|
|
+ data.add(now.toString());
|
|
|
+ data.add(String.valueOf((long) Math.ceil(stopWatch.getTotalTimeSeconds())));
|
|
|
+ data.add(String.valueOf(stopWatch.getTotalTimeMillis()));
|
|
|
+ data.add(JSON.toJSONString(dto));
|
|
|
+ data.add(JSON.toJSONString(r));
|
|
|
+ // 结果入队列
|
|
|
+ CompletableFuture.runAsync(() -> TestConfig.queue.offer(data), offerExecutor);
|
|
|
+ }, requestExecutor)).toArray(CompletableFuture[]::new));
|
|
|
+ }, startTime);
|
|
|
}
|
|
|
- } catch (IOException e) {
|
|
|
- e.printStackTrace();
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @AllArgsConstructor
|
|
|
- class Task implements Runnable {
|
|
|
- private RestTemplate restTemplate;
|
|
|
- private String phoneNumber;
|
|
|
- private String url;
|
|
|
- private Object dto;
|
|
|
- private String singlePath;
|
|
|
-
|
|
|
- @Override
|
|
|
- public void run() {
|
|
|
- String filePath = singlePath + phoneNumber + ".csv";
|
|
|
- LocalDateTime startTime = LocalDateTime.now();
|
|
|
- long startTimestamp = System.currentTimeMillis();
|
|
|
- R r;
|
|
|
- try {
|
|
|
- r = restTemplate.postForObject(url, dto, R.class);
|
|
|
- } catch (Exception e) {
|
|
|
- long endTimestamp = System.currentTimeMillis();
|
|
|
- long cost = endTimestamp - startTimestamp;
|
|
|
- log.error("{} cost {} -> {}", phoneNumber, cost, e.getMessage(), e);
|
|
|
- try (OutputStreamWriter osw = new OutputStreamWriter(Files.newOutputStream(Paths.get(filePath)),
|
|
|
- StandardCharsets.UTF_8);
|
|
|
- CsvWriter csv = CsvWriter.builder().build(osw);) {
|
|
|
- csv.writeRow(JSON.toJSONString(dto), startTime.toString(), String.valueOf(cost),
|
|
|
- JSON.toJSONString(e.getMessage()));
|
|
|
- return;
|
|
|
- } catch (IOException ioException) {
|
|
|
- log.error("{} cost {} -> {}", phoneNumber, cost, ioException.getMessage(), ioException);
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- long endTimestamp = System.currentTimeMillis();
|
|
|
- long cost = endTimestamp - startTimestamp;
|
|
|
- try (OutputStreamWriter osw = new OutputStreamWriter(Files.newOutputStream(Paths.get(filePath)),
|
|
|
- StandardCharsets.UTF_8);
|
|
|
- CsvWriter csv = CsvWriter.builder().build(osw);) {
|
|
|
- csv.writeRow(JSON.toJSONString(dto), startTime.toString(), String.valueOf(cost), JSON.toJSONString(r));
|
|
|
- } catch (IOException e) {
|
|
|
- log.error("{} cost {} -> {}", phoneNumber, cost, e.getMessage(), e);
|
|
|
+ /**
|
|
|
+ * 写文件
|
|
|
+ *
|
|
|
+ * @param path 写入文件路径
|
|
|
+ */
|
|
|
+ public void writeFile(String path) {
|
|
|
+ ScheduledThreadPoolExecutor scheduledExecutor = scheduler.getScheduledThreadPoolExecutor();
|
|
|
+ try (OutputStreamWriter osw = new OutputStreamWriter(Files.newOutputStream(Paths.get(path)),
|
|
|
+ "gbk");
|
|
|
+ CsvWriter csv = CsvWriter.builder().build(osw)) {
|
|
|
+ csv.writeRow("时间", "耗时(s)", "耗时(ms)", "入参", "结果");
|
|
|
+ while (scheduler.getActiveCount() > 0
|
|
|
+ || !scheduledExecutor.getQueue().isEmpty()
|
|
|
+ || scheduledExecutor.getCompletedTaskCount() < scheduledExecutor.getTaskCount()
|
|
|
+ || requestExecutor.getActiveCount() > 0
|
|
|
+ || !requestExecutor.getQueue().isEmpty()
|
|
|
+ || requestExecutor.getCompletedTaskCount() < requestExecutor.getTaskCount()
|
|
|
+ || offerExecutor.getActiveCount() > 0
|
|
|
+ || !offerExecutor.getQueue().isEmpty()
|
|
|
+ || offerExecutor.getCompletedTaskCount() < offerExecutor.getTaskCount()
|
|
|
+ || !TestConfig.queue.isEmpty()) {
|
|
|
+ List<String> t = TestConfig.queue.take();
|
|
|
+ csv.writeRow(t);
|
|
|
+ log.info("schedulerCompletedTaskCount: {}, schedulerTaskCount: {}, schedulerQueueSize: {}, schedulerActiveCount: {}, requestCompletedTaskCount: {}, requestTaskCount: {}, requestQueueSize: {}, requestActiveCount: {}, offerCompletedTaskCount: {}, offerTaskCount: {}, offerExecutorQueueSize: {}, OfferActiveCount: {}",
|
|
|
+ scheduledExecutor.getCompletedTaskCount(),
|
|
|
+ scheduledExecutor.getTaskCount(),
|
|
|
+ scheduledExecutor.getQueue().size(),
|
|
|
+ scheduler.getActiveCount(),
|
|
|
+ requestExecutor.getCompletedTaskCount(),
|
|
|
+ requestExecutor.getTaskCount(),
|
|
|
+ requestExecutor.getQueue().size(),
|
|
|
+ requestExecutor.getActiveCount(),
|
|
|
+ offerExecutor.getCompletedTaskCount(),
|
|
|
+ offerExecutor.getTaskCount(),
|
|
|
+ offerExecutor.getQueue().size(),
|
|
|
+ offerExecutor.getActiveCount());
|
|
|
}
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
}
|
|
|
}
|
|
|
}
|