Explorar el Código

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

hl hace 2 semanas
padre
commit
6d2ea7fa87
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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) {