Browse Source

REPORT-117002 feat:设计器UI性能监控

feature/x
Levy.Xie-解安森 4 months ago
parent
commit
727a94e475
  1. 8
      designer-base/src/main/java/com/fr/design/carton/CartonUtils.java
  2. 8
      designer-base/src/main/java/com/fr/design/carton/latency/DesignerLatencyMetric.java

8
designer-base/src/main/java/com/fr/design/carton/CartonUtils.java

@ -116,10 +116,10 @@ public class CartonUtils {
} }
file.createNewFile(); file.createNewFile();
} }
BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(file, true)); try (BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(file, true))) {
String outputMessage = message.replaceAll("~", "\r\n") + "," + "\r\n"; String outputMessage = message.replaceAll("~", "\r\n") + "," + "\r\n";
bufferedWriter.write(outputMessage); bufferedWriter.write(outputMessage);
bufferedWriter.close(); }
} catch (IOException e) { } catch (IOException e) {
FineLoggerFactory.getLogger().error("output fail", e); FineLoggerFactory.getLogger().error("output fail", e);
} }

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

@ -92,8 +92,12 @@ public class DesignerLatencyMetric {
*/ */
public void stop() { public void stop() {
if (SwitchForSwingChecker.isLatencyMonitoring()) { if (SwitchForSwingChecker.isLatencyMonitoring()) {
this.executorService.shutdown(); if (this.executorService != null) {
this.scheduler.shutdown(); this.executorService.shutdown();
}
if (this.scheduler != null) {
this.scheduler.shutdown();
}
collectAndSubmit(); collectAndSubmit();
} }
} }

Loading…
Cancel
Save