</>PackageGraphPackageGraph

tinybench

npmv6.1.6TypeScript

πŸ”Ž A simple, tiny and lightweight benchmarking library!

Safe to adopt

Yes β€” tinybench scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 4 days ago. 40 releases in the last 2 years.

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • AMaintenance: grade A, Excellent.

    Last published 4 days ago. 40 releases in the last 2 years.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 96 KB installed.

  • ASupply chain: grade A, Excellent.

    No install scripts, 3 maintainers, and a contained dependency surface.

  • ALicense: grade A, Excellent.

    MIT β€” permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph β€” downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding tinybench to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

96 KB
Install size

Unpacked size of this package plus its entire runtime tree.

β€”
Tree depth

Longest resolved dependency chain below this package.

Compatibility

Node.js
node >=20.0.0
Module format
ESM + CommonJS
TypeScript
Types included
Install scripts
None

Quick start

A usage example from the tinybench README.

import { Bench } from 'tinybench'

const bench = new Bench({ name: 'simple benchmark', time: 100 })

bench
  .add('faster task', () => {
    console.log('I am faster')
  })
  .add('slower task', async () => {
    await new Promise(resolve => setTimeout(resolve, 1)) // we wait 1ms :)
    console.log('I am slower')
  })

await bench.run()
Example truncated β€” see the full README.

tinybench vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
tinybenchthis page016MIT4 days ago
fflate53.5M1MIT1 day ago
tinyexec08MIT1 day ago
tinyglobby08MIT1 day ago
@open-draft/logger01MIT1 day ago

Used by

Popular packages that depend on tinybench.

whatwg-urlnpm

An implementation of the WHATWG URL Standard's URL API and parsing machinery

↓ 204.4M/wkβ—ˆ 3 dependentsβš– MIT
entitiesnpm

Encode & decode XML and HTML entities with ease & speed

↓ 204M/wkβ—ˆ 3 dependentsβš– BSD-2-ClauseTS
vitestnpm

Next generation testing framework powered by Vite

↓ 92.7M/wkβ—ˆ 129 dependentsβš– MITTS
webpacknpm

Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.

↓ 49.8M/wkβ—ˆ 29 dependentsβš– MITTS
cheerionpm

The fast, flexible & elegant library for parsing and manipulating HTML and XML.

↓ 24.1M/wkβ—ˆ 5 dependentsβš– MITTS
enhanced-resolvenpm

Offers a async require.resolve function. It's highly configurable.

↓ 0/wkβ—ˆ 1 dependentsβš– MITTS
tinyglobbynpm

A fast and minimal alternative to globby and fast-glob

↓ 0/wkβ—ˆ 8 dependentsβš– MITTS
jsdomnpm

A JavaScript implementation of many web standards

↓ 0/wkβ—ˆ 20 dependentsβš– MIT
@asamuzakjp/dom-selectornpm

A CSS selector engine.

↓ 0/wkβ—ˆ 1 dependentsβš– MITTS
snappynpm

Fastest Snappy compression library in Node.js

↓ 0/wkβ—ˆ 1 dependentsβš– MITTS
levennpm

Measure the difference between two strings using the Levenshtein distance algorithm

↓ 0/wkβ—ˆ 2 dependentsβš– MITTS
quickjs-wasinpm

Snapshotable JavaScript runtime via WebAssembly. QuickJS-NG compiled to WASM with snapshot/restore support.

↓ 0/wkβ—ˆ 3 dependentsβš– MITTS
fast-json-stringifynpm

Stringify your JSON at max speed

↓ 0/wkβ—ˆ 3 dependentsβš– MITTS
light-my-requestnpm

Fake HTTP injection library

↓ 0/wkβ—ˆ 1 dependentsβš– BSD-3-ClauseTS
tapablenpm

Just a little module for plugins.

↓ 0/wkβ—ˆ 2 dependentsβš– MITTS
watchpacknpm

Wrapper library for directory and file watching.

↓ 0/wkβ—ˆ 1 dependentsβš– MITTS

Relationship graph

Dependencies (left) and dependents (right) of tinybench.

Frequently installed together

Release history

24 releases in the last two years, typically about 8 days apart.

Recent versions of tinybench
VersionPublishedSizeLicense
6.1.6latest4 days ago96 KBMIT
6.1.55 days ago96 KBMIT
6.1.412 days ago96 KBMIT
6.1.31 month ago96 KBMIT
6.1.21 month ago96 KBMIT
6.1.11 month ago95 KBMIT
6.1.01 month ago95 KBMIT
6.0.31 month ago76 KBMIT
6.0.23 months ago76 KBMIT
6.0.14 months ago70 KBMIT
6.0.09 months ago73 KBMIT
6.0.0-rc.19 months ago73 KBMIT
6.0.0-beta.49 months ago73 KBMIT
6.0.0-beta.39 months ago73 KBMIT
6.0.0-beta.29 months ago73 KBMIT

Overview

tinybench is an npm package that πŸ”Ž A simple, tiny and lightweight benchmarking library!. It has 16 known dependents in the graph. The latest version is 6.1.6, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need πŸ”Ž A simple, tiny and lightweight benchmarking library! and value a focused solution.

When not to use it

Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.

Pros

  • Ships TypeScript type definitions.
  • Clear open-source license (MIT).
  • Zero runtime dependencies β€” minimal footprint.

Cons

  • No significant drawbacks detected from available metadata.

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Frequently asked questions

Should I use tinybench?

Yes β€” tinybench scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 4 days ago. 40 releases in the last 2 years.

How do I install tinybench?

Run `npm install tinybench` to add tinybench to your npm project.

What license is tinybench released under?

tinybench is distributed under the MIT license.

How popular is tinybench?

npm does not publish download counts. Within PackageGraph's crawl, 16 known packages depend on tinybench.

Is tinybench still maintained?

The most recent release of tinybench (v6.1.6) was published 4 days ago.

Does tinybench run install scripts?

No. tinybench does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.