diff options
| author | wangwei <[email protected]> | 2023-02-17 12:58:12 +0800 |
|---|---|---|
| committer | wangwei <[email protected]> | 2023-02-17 12:58:12 +0800 |
| commit | 878e68519b92a307a7d5c06d628e89da27510c22 (patch) | |
| tree | 10b80e9fa87a5c6f46fd8914d007e25f484d1337 | |
| parent | 954cd458e36a27c000ac8b7f2e231f0745230b98 (diff) | |
添加执行信息
| -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"); } |
