Commit 8e0f90fd by 向延琳

测试存储环境

1 parent 9569c7a0
...@@ -220,12 +220,10 @@ public class DashboardService extends AbstractCommonService { ...@@ -220,12 +220,10 @@ public class DashboardService extends AbstractCommonService {
log.info("{} 耗时:{} ms", "看板统计信息 - sn查询", stopWatch.getLastTaskTimeMillis()); log.info("{} 耗时:{} ms", "看板统计信息 - sn查询", stopWatch.getLastTaskTimeMillis());
//断电报警 //断电报警
int powerOffCount = getPowerOffCount(sns); CompletableFuture<Integer> powerOffFutureFuture = CompletableFuture.supplyAsync(() -> getPowerOffCount(sns));
// CompletableFuture<Integer> powerOffFutureFuture = CompletableFuture.supplyAsync(() -> getPowerOffCount(sns));
//光感报警 //光感报警
int lightCount = getLightCount(sns); CompletableFuture<Integer> lightFutureFuture = CompletableFuture.supplyAsync(() -> getLightCount(sns));
// CompletableFuture<Integer> lightFutureFuture = CompletableFuture.supplyAsync(() -> getLightCount(sns));
//围栏报警 //围栏报警
stopWatch.start(); stopWatch.start();
...@@ -236,14 +234,14 @@ public class DashboardService extends AbstractCommonService { ...@@ -236,14 +234,14 @@ public class DashboardService extends AbstractCommonService {
//在线率 //在线率
String onlineRate = getOnLineRate(totalActiveDevice); String onlineRate = getOnLineRate(totalActiveDevice);
// int powerOffCount; int powerOffCount;
// int lightCount; int lightCount;
// try { try {
// powerOffCount = powerOffFutureFuture.get(); powerOffCount = powerOffFutureFuture.get();
// lightCount = lightFutureFuture.get(); lightCount = lightFutureFuture.get();
// } catch (InterruptedException | ExecutionException e) { } catch (InterruptedException | ExecutionException e) {
// throw new RuntimeException(e); throw new RuntimeException(e);
// } }
long t2 = System.currentTimeMillis(); long t2 = System.currentTimeMillis();
log.info("{} 总耗时:{} ms", "看板统计信息", t2 - t1); log.info("{} 总耗时:{} ms", "看板统计信息", t2 - t1);
return new StatisticalInfoVO(totalActiveDevice, totalVehicle, todayActiveDevice, powerOffCount, fenceCount, lightCount, onlineRate); return new StatisticalInfoVO(totalActiveDevice, totalVehicle, todayActiveDevice, powerOffCount, fenceCount, lightCount, onlineRate);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!