@hazae41/deimos
v2.0.3
Published
Modern and minimalist benchmarking library
Readme
npm install @hazae41/deimosdeno install jsr:@hazae41/deimosPhilosophy 🧠
Deimos aims to be minimalist and to always work no matter the:
- runtime (Node, Deno, browser)
- module resolution (ESM, CommonJS)
- language (TypeScript, JavaScript)
- bundler (Rollup, Vite)
It's just a library you can import everywhere! That's it, no CLI, no configuration file, just JavaScript.
Features 🔥
Current features
- 100% TypeScript and ESM
- No external dependency
- Runnable in the browser
Usage 🚀
import { bench } from "@hazae41/deimos"
const a = await bench("my library", async () => {
await compute()
})
const b = await bench("some other library", async () => {
await compute2()
})
a.tableAndSummary(b)
console.log(`${a.name} is ${a.ratio(b)} times faster than ${b.name}`)Running 🏎️
Node
node --test --test-concurrency=1 ./out/**/*.bench.jsDeno
deno test ./src/**/*.bench.tsOther
await import("./mymodule.bench.ts")