From 8cbef9ef05e790eb558e4eef1c61408b500b3c8d Mon Sep 17 00:00:00 2001 From: "Richard.Fang" Date: Fri, 19 Jul 2024 16:03:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-125224=20fix:=E8=A1=A5=E5=85=85?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=90=AF=E5=8A=A8=E8=AE=A1=E6=97=B6?= =?UTF-8?q?=E5=99=A8=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-realize/src/main/java/com/fr/start/MainDesigner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/start/MainDesigner.java b/designer-realize/src/main/java/com/fr/start/MainDesigner.java index dab50eb3ce..632548607b 100644 --- a/designer-realize/src/main/java/com/fr/start/MainDesigner.java +++ b/designer-realize/src/main/java/com/fr/start/MainDesigner.java @@ -161,7 +161,7 @@ public class MainDesigner extends BaseDesigner { ServerTray.init(); } FineLoggerFactory.getLogger().info("Designer started.Time used {} ms", DesignerStartupContext.getRecorder().getTime(TimeUnit.MILLISECONDS)); - + DesignerStartupContext.getRecorder().stop(); SwitchForSwingChecker.initThreadMonitoring(); DesignerLatencyMetric.getInstance().start(); } From 4cff4a2dd7b5e72ad6b4851fb5f4952be7079e75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levy=2EXie-=E8=A7=A3=E5=AE=89=E6=A3=AE?= Date: Mon, 22 Jul 2024 10:52:08 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-111995=20=E3=80=90NewUI=E3=80=91?= =?UTF-8?q?=E6=96=87=E4=BB=B6-=E9=80=89=E9=A1=B9=E5=92=8C=E5=B8=AE?= =?UTF-8?q?=E5=8A=A9=E9=9D=A2=E6=9D=BF=E7=BF=BB=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/carton/latency/DesignerLatencyMetric.java | 10 ++++------ .../com/fr/design/carton/latency/LatencyLevel.java | 6 ++---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java b/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java index 4dc38634c0..75fa28ef1e 100644 --- a/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java +++ b/designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java @@ -9,10 +9,10 @@ import com.fr.event.Event; import com.fr.event.EventDispatcher; import com.fr.event.Listener; import com.fr.general.CloudCenter; +import com.fr.general.GeneralUtils; import com.fr.general.http.HttpToolbox; import com.fr.json.JSONObject; import com.fr.log.FineLoggerFactory; -import com.fr.stable.ProductConstants; import com.fr.stable.StringUtils; import com.fr.workspace.WorkContext; import com.fr.workspace.Workspace; @@ -81,7 +81,7 @@ public class DesignerLatencyMetric { this.scheduler = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("LatencyMetricWorker")); this.scheduler.scheduleWithFixedDelay(this::collectAndSubmit, 60, 60, TimeUnit.MINUTES); // 注册设计器工作目录切换事件监听 - EventDispatcher.listen(WorkspaceEvent.AfterSwitch, new Listener() { + EventDispatcher.listen(WorkspaceEvent.BeforeSwitch, new Listener() { @Override public void on(Event event, Workspace param) { collectAndSubmit(); @@ -162,13 +162,11 @@ public class DesignerLatencyMetric { info.put(APPID, MarketConfig.getInstance().getCloudOperationMaintenanceId()); info.put(USERID, MarketConfig.getInstance().getBbsUid()); info.put(DESIGNER_ID, DesignerEnvManager.getEnvManager().getUUID()); - info.put(DESIGNER_VERSION, ProductConstants.DESIGNER_VERSION); + info.put(DESIGNER_VERSION, GeneralUtils.getVersion()); info.put(DESIGN_METHOD, WorkContext.getCurrent().isLocal() ? LOCAL : REMOTE); info.put(OPERANDS_NUM, LATENCY_CONTAINER.values().stream().mapToInt(AtomicInteger::get).sum()); for (Map.Entry entry : LATENCY_CONTAINER.entrySet()) { - if (!LatencyLevel.UNDEFINE.equals(entry.getKey())) { - info.put(entry.getKey().getMark(), entry.getValue().get()); - } + info.put(entry.getKey().getMark(), entry.getValue().get()); } return info; } diff --git a/designer-base/src/main/java/com/fr/design/carton/latency/LatencyLevel.java b/designer-base/src/main/java/com/fr/design/carton/latency/LatencyLevel.java index 0d40b37d89..f190bb883d 100644 --- a/designer-base/src/main/java/com/fr/design/carton/latency/LatencyLevel.java +++ b/designer-base/src/main/java/com/fr/design/carton/latency/LatencyLevel.java @@ -24,9 +24,7 @@ public enum LatencyLevel { // 非常严重卡顿 EXTREME(2000, 3000, "waitNum7"), // 极度卡顿 - CRITICAL(3000, Long.MAX_VALUE, "waitNum8"), - // 未知场景 - UNDEFINE(-1, -1, "unknown"); + CRITICAL(3000, Long.MAX_VALUE, "waitNum8"); final long start; final long end; @@ -62,6 +60,6 @@ public enum LatencyLevel { return level; } } - return UNDEFINE; + return CRITICAL; } }