From 63b01db83d9aad8a15276b4236a9a22e4aeef065 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期二, 05 五月 2026 12:30:59 +0800
Subject: [PATCH] # Agent数据分析V3.0.1.7
---
src/main/java/com/zy/core/thread/impl/ZyStationV5Thread.java | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/impl/ZyStationV5Thread.java b/src/main/java/com/zy/core/thread/impl/ZyStationV5Thread.java
index d563265..b4f259a 100644
--- a/src/main/java/com/zy/core/thread/impl/ZyStationV5Thread.java
+++ b/src/main/java/com/zy/core/thread/impl/ZyStationV5Thread.java
@@ -50,6 +50,7 @@
private static final int EXECUTOR_QUEUE_WARN_THRESHOLD = 20;
private static final int EXECUTOR_ACTIVE_WARN_THRESHOLD = 48;
private static final long SEGMENT_EXECUTE_WARN_MS = 10_000L;
+ private static final long COMMAND_BUILD_WARN_MS = 500L;
private static final int QUEUE_DRAIN_BATCH_SIZE = 32;
private static final long QUEUE_IDLE_SLEEP_MS = 20L;
@@ -254,8 +255,25 @@
stationCommand.setCommandType(commandType);
if (commandType == StationCommandType.MOVE && !stationId.equals(targetStationId)) {
+ long startNs = System.nanoTime();
+ long calcPathStartNs = startNs;
List<NavigateNode> nodes = calcPathNavigateNodes(taskNo, stationId, targetStationId, pathLenFactor);
- return fillMoveCommandPath(stationCommand, nodes, taskNo, stationId, targetStationId);
+ long calcPathCostMs = nanosToMillis(System.nanoTime() - calcPathStartNs);
+ long fillCommandStartNs = System.nanoTime();
+ StationCommand builtCommand = fillMoveCommandPath(stationCommand, nodes, taskNo, stationId, targetStationId);
+ long fillCommandCostMs = nanosToMillis(System.nanoTime() - fillCommandStartNs);
+ long totalCostMs = nanosToMillis(System.nanoTime() - startNs);
+ if (totalCostMs >= COMMAND_BUILD_WARN_MS) {
+ log.warn("V5杈撻�佸懡浠ょ敓鎴愯�楁椂杈冮暱锛宒eviceNo={}, taskNo={}, stationId={}, targetStaNo={}, calcPath={}ms, fillCommand={}ms, total={}ms",
+ deviceConfig == null ? null : deviceConfig.getDeviceNo(),
+ taskNo,
+ stationId,
+ targetStationId,
+ calcPathCostMs,
+ fillCommandCostMs,
+ totalCostMs);
+ }
+ return builtCommand;
}
return stationCommand;
}
--
Gitblit v1.9.1