|
@@ -54,6 +54,8 @@ public class IOTWebSocketClient extends WebSocketClient {
|
|
|
|
|
|
Date lastTime = new Date();
|
|
|
volatile int recent_count = 0;
|
|
|
+ volatile int recent_change_count = 0;
|
|
|
+ volatile int recent_affect_count = 0;
|
|
|
|
|
|
@Override
|
|
|
public void onMessage(String arg0) {
|
|
@@ -63,8 +65,11 @@ public class IOTWebSocketClient extends WebSocketClient {
|
|
|
Date currTime = new Date();
|
|
|
if (currTime.getTime() / (1000L * 60) != lastTime.getTime() / (1000L * 60)) {
|
|
|
lastTime = currTime;
|
|
|
- log.warn("IOTWebSocketClient rece count: " + recent_count);
|
|
|
+ log.warn("IOTWebSocketClient recent_count: " + recent_count + " ,recent_change_count: " + recent_change_count
|
|
|
+ + " ,recent_affect_count : " + recent_affect_count + " ");
|
|
|
recent_count = 0;
|
|
|
+ recent_change_count = 0;
|
|
|
+ recent_affect_count = 0;
|
|
|
}
|
|
|
|
|
|
JSONObject json = (JSONObject) JSON.parse(arg0);
|
|
@@ -122,7 +127,11 @@ public class IOTWebSocketClient extends WebSocketClient {
|
|
|
data.value = valueNew;
|
|
|
// 加入计算队列
|
|
|
if (!valueEqual) {
|
|
|
- Repository.ProcessIOT(point);
|
|
|
+ recent_change_count++;
|
|
|
+ int affect_count = Repository.ProcessIOT(point);
|
|
|
+ if (affect_count > 0) {
|
|
|
+ recent_affect_count++;
|
|
|
+ }
|
|
|
}
|
|
|
// 检查是否子系统连接状态
|
|
|
if (meter.startsWith("subsystem_connect_status_")) {
|
|
@@ -220,7 +229,11 @@ public class IOTWebSocketClient extends WebSocketClient {
|
|
|
data.value = valueNew;
|
|
|
// 加入计算队列
|
|
|
if (!valueEqual) {
|
|
|
- Repository.ProcessIOT(point);
|
|
|
+ recent_change_count++;
|
|
|
+ int affect_count = Repository.ProcessIOT(point);
|
|
|
+ if (affect_count > 0) {
|
|
|
+ recent_affect_count++;
|
|
|
+ }
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
log.error(e.getMessage(), e);
|