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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@waynevanson/vitest-benchmark

v0.6.4

Published

Vitest runners and reporters for benchmarking

Downloads

827

Readme

@waynevanson/vitest-benchmark

A Vitest runner and reporter that runs benchmarks on existing tests.

This is not endorsed by Vitest, please use at your own risk.

Development is being tested against AriaKit project in this pull request.

Cost Benefit Analysis

Benefits

  1. Uses existing tests.

Drawbacks

  1. Keeps assertions in place.
  2. Likely not endorsed by Vitest team.

Installation

# Use relevant commands to your package manager.
npm install @waynevanson/vitest-benchmark

There are 2 exports worth configuring:

  1. @waynevanson/vitest-benchmark/runner
  2. @waynevanson/vitest-benchmark/reporter/bmf

@waynevanson/vitest-benchmark/runner

Configure runner for use in Vitest.

NOTE: Without a reporter, results for benchmarks will not be shown. A Reporter needs to be configured that consumes these results.

# Config file
# ie. vitest.config.ts or vite.config.ts

import { defineConfig } from 'vitest/config'

export default defineConfig({
  test: {
    // required. You'll likely want to control this with an environment variable
    runner: "@waynevanson/vitest-benchmark/runner"
    provide: {
      // Configuration defaults, recommendations in comments.
      benchrunner: {
        benchmark: {
          // ~1000
          minCycles: 1,
          minMs: 0
        },
        warmup: {
          // ~50
          minCycles: 0,
          minMs: 0
        },
        // Defaults to undefined and calculates no benchmarks.
        // These are attached to each task as metadata with `task.meta.benchrunner.*`
        results: {
          // takes up a lot of memory, not recommended.
          samples: false,
          latency: {
            average: false,
            min: false,
            max: false,
            // [0.999] for 99.9th percentile.
            percentiles: []
          },
          throughput: {
            average: false,
            min: false,
            max: false,
            // [0.999] for 99.9th percentile.
            percentiles: []
          }
        }
      }
    }
  }
})

@waynevanson/vitest-benchmark/reporter/bmf

Allows integration with Bencher for CI integration.

  1. Run via Vitest CLI.
vitest --reporter="@waynevanson/reporter/bmf"

This will output to minified JSON via stdout.

  1. Send to Bencher.

todo:

Steps

FAQ

Vitest Bench Mode

Vitest already has a bench mode, which is a runner. Why create a new runner?

Because the offical bench runner doesn't call your hooks and doesn't call your existing tests.