mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Closes https://github.com/oven-sh/bun/issues/1723 Closes https://github.com/oven-sh/bun/pull/22214 Closes https://github.com/oven-sh/bun/pull/24241 also supports the `"brotli"` and `"zstd"` formats <img width="1244" height="547" alt="image" src="https://github.com/user-attachments/assets/aecf4489-29ad-411d-9f6b-3bee50ed1b27" />
17 lines
360 B
JavaScript
17 lines
360 B
JavaScript
import * as Mitata from "mitata";
|
|
import process from "node:process";
|
|
|
|
const asJSON = !!process?.env?.BENCHMARK_RUNNER;
|
|
|
|
/** @param {Parameters<typeof Mitata["run"]>["0"]} opts */
|
|
export function run(opts = {}) {
|
|
if (asJSON) {
|
|
opts.format = "json";
|
|
}
|
|
|
|
return Mitata.run(opts);
|
|
}
|
|
|
|
export const bench = Mitata.bench;
|
|
export const group = Mitata.group;
|