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