diff options
author | 2022-02-18 16:06:56 -0600 | |
---|---|---|
committer | 2022-02-18 16:06:56 -0600 | |
commit | 39cbe5008549517d9360bc7c473793523c0c9207 (patch) | |
tree | fe6b2e7c6bf6defbbc80d7e0eb45341fd3c18881 /scripts/memory/index.js | |
parent | 37d4dd8d57d5423f2d099f9eb81b5b41b6d69403 (diff) | |
download | astro-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.js | 4 |
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.` ); |