diff options
| -rw-r--r-- | src/main/java/com/example/nis/Scheduled/Entity.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/com/example/nis/Scheduled/Entity.java b/src/main/java/com/example/nis/Scheduled/Entity.java index 0c27a3d..8dbc00d 100644 --- a/src/main/java/com/example/nis/Scheduled/Entity.java +++ b/src/main/java/com/example/nis/Scheduled/Entity.java @@ -63,6 +63,7 @@ public class Entity { @Scheduled(cron = "${entity.update.cron}") public ResponseData scheduledExecutorOfUpdate() { + long start = System.currentTimeMillis(); log.info("start entity update schedule"); if (BooleanUtil.isFalse(updateEnable)) { log.warn("update schedule disable"); @@ -81,7 +82,7 @@ public class Entity { log.warn("ips is empty, No update"); return ResponseData.ok(); } - log.info("wait to add count: {}", data.size()); + log.info(" [OLAP] get entity,cost: {} seconds, wait to add count: {}", System.currentTimeMillis() - start, data.size()); IpSource ipSource = new IpSource(); List<IpObject> addList = new ArrayList<>(); for (Map map : data) { @@ -104,6 +105,7 @@ public class Entity { @Scheduled(cron = "${entity.delete.cron}") public ResponseData scheduledExecutorOfDelete() { + long start = System.currentTimeMillis(); log.info("start entity delete schedule"); if (BooleanUtil.isFalse(deleteEnable)) { log.warn("delete schedule disable"); @@ -122,6 +124,7 @@ public class Entity { JSONObject obj = jsonArray.getJSONObject(i); deleteList.add(JSONUtil.toBean(obj, IpObject.class)); } + log.info(" [TSG] get object items,cost: {} seconds, wait to delete count: {}", System.currentTimeMillis() - start, deleteList.size()); if (deleteList.isEmpty()) { log.info("deleteList is empty, no execute delete schedule"); } |
