npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ostia

v0.7.2

Published

Fast profiling and benchmarking for Bun.

Readme

ostia

Fast profiling and benchmarking for Bun.

ostia times commands and functions on Bun, then tells you whether a change made them slower: it compares two runs with statistics that account for how noisy your machine is, and ostia ab confirms a regression in fresh processes before it reports one. The CLI and the library do the same things, and every result is one JSON document.

// suite.ts
import { group, task } from "ostia"
import { dedupe } from "./dedupe.ts"

const ids = Array.from({ length: 2_000 }, (_, i) => (i * 7919) % 500)

group("ids", () => {
  task("dedupe 2,000", () => dedupe(ids))
  task("sort 2,000", () => ids.toSorted((a, b) => a - b))
})

It tells you when a change made something slower. Rewrite dedupe from a Set to indexOf, and ostia ab runs your suite against HEAD and the working tree in alternating batches in one process:

Exit 1 on a regression, so CI can gate on it. ostia time does the same for whole commands:

Quick start

bun add -d ostia

Write a suite with group() and task(), as above, then:

ostia bench suite.ts      # time each task
ostia ab suite.ts         # compare the working tree with HEAD

Exit status: 0 pass, 1 a regression (ab, compare, ci), 2 an error.

Common tasks

# Time two commands against each other
ostia time "bun a.ts" "bun b.ts"

# Compare two saved runs
ostia compare before.json after.json

# Save a baseline on known-good code, then gate CI on it
ostia baseline save
ostia ci

# Capture a CPU profile while timing
ostia time "bun a.ts" --cpu

# One JSON object per line, for a script or an agent
ostia bench suite.ts --format events

These docs ship in the package, at node_modules/ostia/docs/.

From code

const doc = await time({
  commands: ["bun a.ts", { command: "bun b.ts", label: "b", prepare: "rm -rf dist" }],
  samples: 20,
  cpu: true,
})

group("parse", () => {
  sweep({ size: range(100, 10_000) }, ({ size }) => {
    const input = buildInput(size) // unmeasured setup, once per point
    task("parse", () => parse(input), { isolate: true })
  })
})

const result = compareDocuments(await loadDocument("before.json"), doc)
if (result.summary.verdict === "fail") process.exitCode = 1

const { text } = await renderers.markdown.render(doc, {})

Docs