Преглед изворни кода

优化日志获取-发现长时间获取会触发100CPU,本次优化尝试解决该问题

hl пре 2 недеља
родитељ
комит
6d2ea7fa87
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/utils/file.js

+ 1 - 1
src/utils/file.js

@@ -159,7 +159,7 @@ async function readLastNLines(dirPath, filePathList, n) {
     }
 }
 
-async function getRecentLogs(dirPath,logFiles, requiredLogs = 500) {
+async function getRecentLogs(dirPath,logFiles, requiredLogs = 100) {
     let logs = [];
 
     for (const file of logFiles) {