diff options
author | 2024-11-06 23:17:39 +0800 | |
---|---|---|
committer | 2024-11-06 23:17:39 +0800 | |
commit | 7db86cf2b75c547b5947bc1a10f21d2e3e56e9da (patch) | |
tree | 115d93a2565958a069462d4e39446059e6395339 /benchmark/bench/_util.js | |
parent | c280655655cc6c22121f32c5f7c76836adf17230 (diff) | |
parent | e10b03e88c22592fbb42d7245b65c4f486ab736d (diff) | |
download | astro-7db86cf2b75c547b5947bc1a10f21d2e3e56e9da.tar.gz astro-7db86cf2b75c547b5947bc1a10f21d2e3e56e9da.tar.zst astro-7db86cf2b75c547b5947bc1a10f21d2e3e56e9da.zip |
Merge branch 'main' into next
Diffstat (limited to 'benchmark/bench/_util.js')
-rw-r--r-- | benchmark/bench/_util.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/benchmark/bench/_util.js b/benchmark/bench/_util.js index 23c472604..b16a16e1c 100644 --- a/benchmark/bench/_util.js +++ b/benchmark/bench/_util.js @@ -14,7 +14,7 @@ export const astroBin = path.resolve(astroPkgPath, '../astro.js'); export function calculateStat(numbers) { const avg = numbers.reduce((a, b) => a + b, 0) / numbers.length; const stdev = Math.sqrt( - numbers.map((x) => Math.pow(x - avg, 2)).reduce((a, b) => a + b, 0) / numbers.length + numbers.map((x) => Math.pow(x - avg, 2)).reduce((a, b) => a + b, 0) / numbers.length, ); const max = Math.max(...numbers); return { avg, stdev, max }; |