|
|
@ -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; |
|
|
|
} |
|
|
|
} |
|
|
|