Skip to content

Commit bd87788

Browse files
committed
Remove unused variables from memory performance test
Removed beforeClear and afterClear variables that were not being used. The test now simply verifies that storage.clear() properly resets the storage stats, which is the actual intent of the test.
1 parent 32ac6ea commit bd87788

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

tests/performance/logPerformance.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,18 +320,14 @@ describe('Log Performance Tests', () => {
320320
storage.storeLog(`cmd${i}`, 'bash', '/', generateLargeOutput(1000), '', 0);
321321
}
322322

323-
const beforeClear = process.memoryUsage().heapUsed;
324323
storage.clear();
325324

326325
// Force garbage collection if available
327326
if (global.gc) {
328327
global.gc();
329328
}
330329

331-
// Give some time for GC
332-
const afterClear = process.memoryUsage().heapUsed;
333-
334-
// Storage should be empty
330+
// Storage should be empty after clear
335331
expect(storage.getStats().totalLogs).toBe(0);
336332
expect(storage.getStats().totalSize).toBe(0);
337333
});

0 commit comments

Comments
 (0)