Skip to content

Commit d40fc61

Browse files
add additional temporary memory logging
1 parent 397a553 commit d40fc61

File tree

1 file changed

+17
-0
lines changed
  • smoke-test/tests/cypress/cypress/support

1 file changed

+17
-0
lines changed

smoke-test/tests/cypress/cypress/support/e2e.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,20 @@ beforeEach(function () {
3939
}
4040
}
4141
});
42+
43+
afterEach(() => {
44+
cy.window().then((win) => {
45+
if (win.performance && win.performance.memory) {
46+
const mem = win.performance.memory;
47+
const formatBytes = (bytes) =>
48+
(bytes / 1024 / 1024 / 1024).toFixed(3) + " GB";
49+
50+
cy.log("=== Browser Tab Memory ===");
51+
cy.log(`Used: ${formatBytes(mem.usedJSHeapSize)}`);
52+
cy.log(`Total: ${formatBytes(mem.totalJSHeapSize)}`);
53+
cy.log(`Limit: ${formatBytes(mem.jsHeapSizeLimit)}`);
54+
} else {
55+
cy.log("Browser memory API not available");
56+
}
57+
});
58+
});

0 commit comments

Comments
 (0)