mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
38 lines
769 B
JavaScript
38 lines
769 B
JavaScript
import { $ as execa$ } from "execa";
|
|
import { $ as zx } from "zx";
|
|
import { bench, group, run } from "../runner.mjs";
|
|
|
|
const execa = execa$({ stdio: "ignore", cwd: import.meta.dirname });
|
|
|
|
group("echo hi", () => {
|
|
if (typeof Bun !== "undefined")
|
|
bench("$`echo hi`", async () => {
|
|
await Bun.$`echo hi`.quiet();
|
|
});
|
|
|
|
bench("execa`echo hi`", async () => {
|
|
await execa`echo hi`;
|
|
});
|
|
|
|
bench("zx`echo hi`", async () => {
|
|
await zx`echo hi`.quiet();
|
|
});
|
|
});
|
|
|
|
group("ls .", () => {
|
|
if (typeof Bun !== "undefined")
|
|
bench("$`ls .`", async () => {
|
|
await Bun.$`ls .`.quiet();
|
|
});
|
|
|
|
bench("execa`ls .`", async () => {
|
|
await execa`ls .`;
|
|
});
|
|
|
|
bench("zx`ls .`", async () => {
|
|
await zx`ls .`.quiet();
|
|
});
|
|
});
|
|
|
|
await run();
|