summaryrefslogtreecommitdiff
path: root/scripts/memory/index.js
diff options
context:
space:
mode:
authorGravatar JuanM04 <me@juanm04.com> 2022-04-02 18:53:00 -0300
committerGravatar JuanM04 <me@juanm04.com> 2022-04-02 18:53:00 -0300
commita377ac1efc86afd1cb37c69248fa5adae0eb6e37 (patch)
tree8edb602e029c6d520fd684de6a36d87934842320 /scripts/memory/index.js
parente30aa4dfef2bbe874e2fe7f07232bf8a3c092317 (diff)
parenta05177c50d52f09f32bcb2983e7af73f6507e235 (diff)
downloadastro-a377ac1efc86afd1cb37c69248fa5adae0eb6e37.tar.gz
astro-a377ac1efc86afd1cb37c69248fa5adae0eb6e37.tar.zst
astro-a377ac1efc86afd1cb37c69248fa5adae0eb6e37.zip
Merge branch 'main' into feat/vercel-adapter
Diffstat (limited to 'scripts/memory/index.js')
-rw-r--r--scripts/memory/index.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/memory/index.js b/scripts/memory/index.js
index 969b1bb17..da55acb71 100644
--- a/scripts/memory/index.js
+++ b/scripts/memory/index.js
@@ -18,8 +18,6 @@ let config = await loadConfig({
cwd: fileURLToPath(projDir),
});
-config.buildOptions.legacyBuild = false;
-
const server = await dev(config, { logging: { level: 'error' } });
// Prime the server so initial memory is created
@@ -37,7 +35,9 @@ const startSize = v8.getHeapStatistics().used_heap_size;
// HUMAN mode: Runs forever. Optimized for accurate results on each snapshot Slower than CI.
if (!isCI) {
- console.log(`Greetings, human. This test will run forever. Run with the "--ci" flag to finish with a result.`);
+ console.log(
+ `Greetings, human. This test will run forever. Run with the "--ci" flag to finish with a result.`
+ );
let i = 1;
while (i++) {
await run();
@@ -64,7 +64,9 @@ const TEST_THRESHOLD = 1.5;
const isPass = percentage < TEST_THRESHOLD;
console.log(``);
console.log(`Result: ${isPass ? 'PASS' : 'FAIL'} (${percentage * 100}%)`);
-console.log(`Memory usage began at ${prettyBytes(startSize)} and finished at ${prettyBytes(endSize)}.`);
+console.log(
+ `Memory usage began at ${prettyBytes(startSize)} and finished at ${prettyBytes(endSize)}.`
+);
console.log(`The threshold for a probable memory leak is ${TEST_THRESHOLD * 100}%`);
console.log(``);
console.log(`Exiting...`);