소스 검색

心跳接口修改

gao.qiang 1 년 전
부모
커밋
772c7f5c7c
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      business-service/src/main/java/com/ozs/utils/CameraUtil.java

+ 9 - 0
business-service/src/main/java/com/ozs/utils/CameraUtil.java

@@ -1649,6 +1649,9 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
      * @return
      */
     public static int urlCount(String url) {
+        long begin = System.currentTimeMillis();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        log.info("urlCountf方法开始时间: " + sdf.format(new Date(begin)));
         int maxRetries = 5;
         int retryCount = 0;
         int count = 0;
@@ -1669,6 +1672,8 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
                 retryCount++;
             }
         }
+        long zhong = System.currentTimeMillis();
+        log.info("urlCountf方法循环时间: " + sdf.format(new Date(zhong)));
         if (!ObjectUtils.isEmpty(streamArray)) {
 //            for (int i = 0; i < streamArray.size(); i++) {
 //                JSONObject subObj = streamArray.getJSONObject(i);
@@ -1677,8 +1682,12 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
 //                    count++;
 //                }
 //            }
+            long end = System.currentTimeMillis();
+            log.info("urlCountf方法结束时间: " + sdf.format(new Date(end)));
             return streamArray.size();
         } else {
+            long end = System.currentTimeMillis();
+            log.info("urlCountf方法结束时间: " + sdf.format(new Date(end)));
             return count;
         }
     }