fix deno console.log benchmark (#771)

* chore(benchmark): fix deno console.log benchmark

* only show benchmark results

Co-authored-by: evanwashere <github@evan.lol>
This commit is contained in:
Shahidul Islam Majumder
2022-07-19 05:30:58 +06:00
committed by GitHub
parent d2874f6a49
commit 600929ee6d
7 changed files with 21 additions and 2 deletions

View File

@@ -2,6 +2,7 @@
npm install
bun run ffi
bun run log
bun run gzip
bun run async
bun run sqlite

3
bench/log/.env Normal file
View File

@@ -0,0 +1,3 @@
BUN=bun
DENO=deno
NODE=node

View File

@@ -1,4 +1,5 @@
import { bench, run } from "mitata";
bench("console.log", () => console.log("hello"));
bench("console.log('hello')", () => console.log("hello"));
bench("console.log({ hello: 'object' })", () => console.log({ hello: "object" }));
await run();

View File

@@ -1,4 +1,5 @@
import { bench, run } from "../../node_modules/mitata/src/cli.mjs";
import { bench, run } from "../node_modules/mitata/src/cli.mjs";
bench("console.log", () => console.log("hello"));
bench("console.log({ hello: 'object' })", () => console.log({ hello: "object" }));
await run();

View File

@@ -1,4 +1,5 @@
import { bench, run } from "mitata";
bench("console.log", () => console.log("hello"));
bench("console.log({ hello: 'object' })", () => console.log({ hello: "object" }));
await run();

11
bench/log/package.json Normal file
View File

@@ -0,0 +1,11 @@
{
"name": "bench",
"scripts": {
"deps": "exit 0",
"build": "exit 0",
"bench:bun": "$BUN bun.js | grep iter",
"bench:node": "$NODE node.mjs | grep iter",
"bench:deno": "$DENO run -A --unstable deno.mjs | grep iter",
"bench": "bun run bench:bun && bun run bench:node && bun run bench:deno"
}
}

View File

@@ -9,6 +9,7 @@
},
"scripts": {
"ffi": "cd ffi && bun run deps && bun run build && bun run bench",
"log": "cd log && bun run deps && bun run build && bun run bench",
"gzip": "cd gzip && bun run deps && bun run build && bun run bench",
"async": "cd async && bun run deps && bun run build && bun run bench",
"sqlite": "cd sqlite && bun run deps && bun run build && bun run bench"