summaryrefslogtreecommitdiff
path: root/scripts/memory/index.js
diff options
context:
space:
mode:
authorGravatar Nate Moore <natemoo-re@users.noreply.github.com> 2022-02-18 16:06:56 -0600
committerGravatar GitHub <noreply@github.com> 2022-02-18 16:06:56 -0600
commit39cbe5008549517d9360bc7c473793523c0c9207 (patch)
treefe6b2e7c6bf6defbbc80d7e0eb45341fd3c18881 /scripts/memory/index.js
parent37d4dd8d57d5423f2d099f9eb81b5b41b6d69403 (diff)
downloadastro-39cbe5008549517d9360bc7c473793523c0c9207.tar.gz
astro-39cbe5008549517d9360bc7c473793523c0c9207.tar.zst
astro-39cbe5008549517d9360bc7c473793523c0c9207.zip
Expose private `.env` variables to `import.meta.env` during SSR (#2612)
* chore(examples): add env-vars example * feat: improve import.meta.env support * chore: add changeset * test: update astro-envs test * refactor: cleanup code based on feedback * fix: import.meta guard * fix: update memory test threshold to 10%
Diffstat (limited to 'scripts/memory/index.js')
-rw-r--r--scripts/memory/index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/memory/index.js b/scripts/memory/index.js
index 2729c7631..29b20832d 100644
--- a/scripts/memory/index.js
+++ b/scripts/memory/index.js
@@ -75,9 +75,9 @@ let medianOfAll = median(sizes);
// If the trailing average is higher than the median, see if it's more than 5% higher
if (averageOfLastThirty > medianOfAll) {
let percentage = Math.abs(averageOfLastThirty - medianOfAll) / medianOfAll;
- if (percentage > 0.05) {
+ if (percentage > 0.1) {
throw new Error(
- `The average towards the end (${prettyBytes(averageOfLastThirty)}) is more than 5% higher than the median of all runs (${prettyBytes(
+ `The average towards the end (${prettyBytes(averageOfLastThirty)}) is more than 10% higher than the median of all runs (${prettyBytes(
medianOfAll
)}). This tells us that memory continues to grow and a leak is likely.`
);