Browse Source

REPORT-127241 设计器性能埋点字段调整

release/11.0
Levy.Xie-解安森 4 months ago
parent
commit
edc7184564
  1. 7
      designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java

7
designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java

@ -87,6 +87,7 @@ public class DesignerLatencyMetric {
collectAndSubmit(); collectAndSubmit();
} }
}); });
FineLoggerFactory.getLogger().info("[Latency] designer latency metric started.");
} }
} }
@ -102,6 +103,7 @@ public class DesignerLatencyMetric {
this.scheduler.shutdown(); this.scheduler.shutdown();
} }
collectAndSubmit(); collectAndSubmit();
FineLoggerFactory.getLogger().info("[Latency] designer latency metric stopped.");
} }
} }
@ -147,6 +149,7 @@ public class DesignerLatencyMetric {
para.put("content", collect()); para.put("content", collect());
try { try {
HttpToolbox.post(getLatencyUrl(), para); HttpToolbox.post(getLatencyUrl(), para);
FineLoggerFactory.getLogger().debug("[Latency] submit latency log to cloud.");
} catch (Throwable t) { } catch (Throwable t) {
FineLoggerFactory.getLogger().debug(t,"[Latency] failed to submit latency log to cloud."); FineLoggerFactory.getLogger().debug(t,"[Latency] failed to submit latency log to cloud.");
} }
@ -163,7 +166,9 @@ public class DesignerLatencyMetric {
info.put(DESIGN_METHOD, WorkContext.getCurrent().isLocal() ? LOCAL : REMOTE); info.put(DESIGN_METHOD, WorkContext.getCurrent().isLocal() ? LOCAL : REMOTE);
info.put(OPERANDS_NUM, LATENCY_CONTAINER.values().stream().mapToInt(AtomicInteger::get).sum()); info.put(OPERANDS_NUM, LATENCY_CONTAINER.values().stream().mapToInt(AtomicInteger::get).sum());
for (Map.Entry<LatencyLevel, AtomicInteger> entry : LATENCY_CONTAINER.entrySet()) { for (Map.Entry<LatencyLevel, AtomicInteger> entry : LATENCY_CONTAINER.entrySet()) {
info.put(entry.getKey().getMark(), entry.getValue().get()); if (!LatencyLevel.UNDEFINE.equals(entry.getKey())) {
info.put(entry.getKey().getMark(), entry.getValue().get());
}
} }
return info; return info;
} }

Loading…
Cancel
Save