diff options
author | 2022-12-14 18:52:33 -0800 | |
---|---|---|
committer | 2022-12-15 16:28:47 -0800 | |
commit | 3c1ad4b56892cffa45b8dbe958ac1ce3b8a7179f (patch) | |
tree | f65f1614e41b7c370f0e3ff7c924dfe505c604dc /bench | |
parent | 743531b4ac9d92dfaa3016d49cfb2cab799621a3 (diff) | |
download | bun-3c1ad4b56892cffa45b8dbe958ac1ce3b8a7179f.tar.gz bun-3c1ad4b56892cffa45b8dbe958ac1ce3b8a7179f.tar.zst bun-3c1ad4b56892cffa45b8dbe958ac1ce3b8a7179f.zip |
prettier
Diffstat (limited to 'bench')
-rw-r--r-- | bench/fetch/bun.js | 2 | ||||
-rw-r--r-- | bench/fetch/deno.js | 2 | ||||
-rw-r--r-- | bench/ffi/deno.js | 2 | ||||
-rw-r--r-- | bench/hot-module-reloading/css-stress-test/browser.js | 4 | ||||
-rw-r--r-- | bench/hot-module-reloading/css-stress-test/read-frames.js | 8 | ||||
-rw-r--r-- | bench/json-stringify/bun.js | 4 | ||||
-rw-r--r-- | bench/log/bun.js | 4 | ||||
-rw-r--r-- | bench/module-loader/create.js | 16 |
8 files changed, 22 insertions, 20 deletions
diff --git a/bench/fetch/bun.js b/bench/fetch/bun.js index f61eeb0c6..7559b467e 100644 --- a/bench/fetch/bun.js +++ b/bench/fetch/bun.js @@ -7,7 +7,7 @@ bench(`fetch(https://example.com) x ${count}`, async () => { for (let i = 0; i < requests.length; i++) { requests[i] = fetch(`https://www.example.com/?cachebust=${i}`).then((r) => - r.text() + r.text(), ); } diff --git a/bench/fetch/deno.js b/bench/fetch/deno.js index 929a478a0..3eef41698 100644 --- a/bench/fetch/deno.js +++ b/bench/fetch/deno.js @@ -7,7 +7,7 @@ bench(`fetch(https://example.com) x ${count}`, async () => { for (let i = 0; i < requests.length; i++) { requests[i] = fetch(`https://www.example.com/?cachebust=${i}`).then((r) => - r.text() + r.text(), ); } diff --git a/bench/ffi/deno.js b/bench/ffi/deno.js index 0b4832f1a..8f4c76ca2 100644 --- a/bench/ffi/deno.js +++ b/bench/ffi/deno.js @@ -3,7 +3,7 @@ import { run, bench, group } from "../node_modules/mitata/src/cli.mjs"; const extension = "darwin" !== Deno.build.os ? "so" : "dylib"; const path = new URL( "src/target/release/libffi_napi_bench." + extension, - import.meta.url + import.meta.url, ).pathname; const { diff --git a/bench/hot-module-reloading/css-stress-test/browser.js b/bench/hot-module-reloading/css-stress-test/browser.js index d0835ac57..15938dff2 100644 --- a/bench/hot-module-reloading/css-stress-test/browser.js +++ b/bench/hot-module-reloading/css-stress-test/browser.js @@ -43,7 +43,7 @@ if (process.env.PROJECT === "bun") { }, shell: false, - } + }, ); } @@ -114,5 +114,5 @@ async function main() { main().catch((error) => setTimeout(() => { throw error; - }) + }), ); diff --git a/bench/hot-module-reloading/css-stress-test/read-frames.js b/bench/hot-module-reloading/css-stress-test/read-frames.js index ab35c630d..9e264b4df 100644 --- a/bench/hot-module-reloading/css-stress-test/read-frames.js +++ b/bench/hot-module-reloading/css-stress-test/read-frames.js @@ -70,9 +70,9 @@ fs.writeFileSync( `${process.platform}-${ process.arch === "arm64" ? "aarch64" : process.arch }` + - ".json" + ".json", ), - JSON.stringify(report, null, 2) + JSON.stringify(report, null, 2), ); console.log( @@ -101,7 +101,7 @@ console.log( TOTAL_FRAMES, "(" + Math.round( - Math.max(Math.min(1.0, timings.length / TOTAL_FRAMES), 0) * 100 + Math.max(Math.min(1.0, timings.length / TOTAL_FRAMES), 0) * 100, ) + - "%)" + "%)", ); diff --git a/bench/json-stringify/bun.js b/bench/json-stringify/bun.js index dd0f755aa..8c9893794 100644 --- a/bench/json-stringify/bun.js +++ b/bench/json-stringify/bun.js @@ -1,12 +1,12 @@ import { bench, run } from "mitata"; bench("JSON.stringify({hello: 'world'})", () => - JSON.stringify({ hello: "world" }) + JSON.stringify({ hello: "world" }), ); const otherUint8Array = new Uint8Array(1024); bench("Uint8Array.from(otherUint8Array)", () => - Uint8Array.from(otherUint8Array) + Uint8Array.from(otherUint8Array), ); run(); diff --git a/bench/log/bun.js b/bench/log/bun.js index 43728fd64..a2f5dd73e 100644 --- a/bench/log/bun.js +++ b/bench/log/bun.js @@ -1,5 +1,7 @@ import { bench, run } from "mitata"; bench("console.log('hello')", () => console.log("hello")); -bench("console.log({ hello: 'object' })", () => console.log({ hello: "object" })); +bench("console.log({ hello: 'object' })", () => + console.log({ hello: "object" }), +); await run(); diff --git a/bench/module-loader/create.js b/bench/module-loader/create.js index 26ae6cfd3..8c20307af 100644 --- a/bench/module-loader/create.js +++ b/bench/module-loader/create.js @@ -23,7 +23,7 @@ export const hello${i} = "hello${i}"; ${saveStack ? `globalThis.evaluationOrder.push("${file}");` : ""} globalThis.counter++; `, - "utf8" + "utf8", ); var file2 = output + "/file" + i + ".js"; @@ -39,7 +39,7 @@ module.exports.hello${i} = "hello${i}"; ${saveStack ? `globalThis.evaluationOrder.push("${file2}");` : ""} globalThis.counter++; `, - "utf8" + "utf8", ); } @@ -53,7 +53,7 @@ fs.writeFileSync( : "" } `, - "utf8" + "utf8", ); fs.writeFileSync( @@ -66,7 +66,7 @@ fs.writeFileSync( : "" } `, - "utf8" + "utf8", ); fs.writeFileSync( @@ -79,7 +79,7 @@ fs.writeFileSync( console.timeEnd("import"); ${saveStack ? `console.log(globalThis.evaluationOrder.join("\\n"));` : ""} console.log("Loaded", globalThis.counter, "files", "totaling", new Intl.NumberFormat().format(globalThis.exportCounter), 'exports');`, - "utf8" + "utf8", ); fs.writeFileSync( @@ -92,7 +92,7 @@ export const THE_END = Foo.THE_END; console.timeEnd("import.meta.require"); ${saveStack ? `console.log(globalThis.evaluationOrder.join("\\n"));` : ""} console.log("Loaded", globalThis.counter, "files", "totaling", new Intl.NumberFormat().format(globalThis.exportCounter), 'exports');`, - "utf8" + "utf8", ); fs.writeFileSync( @@ -106,7 +106,7 @@ fs.writeFileSync( console.timeEnd("import.meta.require"); ${saveStack ? `console.log(globalThis.evaluationOrder.join("\\n"));` : ""} console.log("Loaded", globalThis.counter, "files", "totaling", new Intl.NumberFormat().format(globalThis.exportCounter), 'exports');`, - "utf8" + "utf8", ); fs.writeFileSync( @@ -120,7 +120,7 @@ fs.writeFileSync( ${saveStack ? `console.log(globalThis.evaluationOrder.join("\\n"));` : ""} console.log("Loaded", globalThis.counter, "files", "totaling", new Intl.NumberFormat().format(globalThis.exportCounter), 'exports'); `, - "utf8" + "utf8", ); console.log(` |