diff options
author | 2024-11-06 12:33:14 +0000 | |
---|---|---|
committer | 2024-11-06 12:33:14 +0000 | |
commit | ed5a9f1b755f9ae31735dacf75b970669c8c38c8 (patch) | |
tree | b539b47c4bbf6bfac981b5d65ff3a92c4339d09b /benchmark/bench/_util.js | |
parent | 222f71894cc7118319ce83b3b29fa61a9dbebb75 (diff) | |
download | astro-ed5a9f1b755f9ae31735dacf75b970669c8c38c8.tar.gz astro-ed5a9f1b755f9ae31735dacf75b970669c8c38c8.tar.zst astro-ed5a9f1b755f9ae31735dacf75b970669c8c38c8.zip |
chore: codspeed benchmark (#12347)
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 }; |