Procházet zdrojové kódy

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

hl před 2 týdny
rodič
revize
6d2ea7fa87
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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) {