Merge pull request #237 from PR0M3TH3AN/perf/optimize-reliability-summary-12744973006292843555

⚡ Optimize lock reliability summary with Promise.all
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-02-17 13:36:35 -05:00
commit 2de7bdd5ce
1 file changed
+8 -2
+8 -2
View File
@@ -182,10 +182,16 @@ async function main() {
continue;
}
for (const entry of entries) {
const promises = entries.map(async (entry) => {
const fullPath = path.join(cadenceDir, entry);
logsScanned += 1;
const record = await readLogFile(fullPath, cadence, cutoffMs);
return record;
});
const results = await Promise.all(promises);
logsScanned += entries.length;
for (const record of results) {
if (!record) continue;
records.push(record);