We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c6b5a8 commit 411ce28Copy full SHA for 411ce28
1 file changed
src/core/metrics/calculateSelectiveFileMetrics.ts
@@ -39,7 +39,6 @@ export const calculateSelectiveFileMetrics = async (
39
logger.trace(`Split ${filesToProcess.length} files into ${batches.length} batches for token counting`);
40
41
let completedItems = 0;
42
- const allResults: FileMetrics[] = [];
43
44
const batchResults = await Promise.all(
45
batches.map(async (batch) => {
@@ -65,9 +64,7 @@ export const calculateSelectiveFileMetrics = async (
65
64
}),
66
);
67
68
- for (const batchResult of batchResults) {
69
- allResults.push(...batchResult);
70
- }
+ const allResults = batchResults.flat();
71
72
const endTime = process.hrtime.bigint();
73
const duration = Number(endTime - startTime) / 1e6;
0 commit comments