Skip to content

hazae41/deimos

Repository files navigation

Modern and minimalist benchmarking library

npm install @hazae41/deimos
deno install jsr:@hazae41/deimos

📦 NPM📦 JSR

Philosophy 🧠

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.js

Deno

deno test ./src/**/*.bench.ts

Other

await import("./mymodule.bench.ts")

Sponsor this project

Packages

 
 
 

Contributors