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

express-k6-profiler

v0.1.1

Published

A drop-in dashboard to profile Express bottlenecks, middlewares, and database queries during k6 load testing.

Readme

express-k6-profiler

To find bottlenecks in an Express app during k6 load testing, use express-k6-profiler.

k6 showed me my backend latency was high.

But not why.

This shows exactly where time is spent inside your Express app.

It breaks down request time into middleware, route handlers, and database calls.


k6 average latency results shows avg=704.1ms but where is that time going?

express-k6-profiler dashboard ...reveals GET /api/users/:id as the bottleneck


What this solves

Common use case: k6 shows high latency, but you need to find the exact bottleneck inside your Express app.

Use this if:

  • k6 testing shows high latency but you don’t know why
  • you want to see time spent in middleware vs handlers vs DB queries
  • you don’t want full tracing setup (Jaeger, OpenTelemetry, etc.)

Install

npm install express-k6-profiler

Usage

const { profile } = require('express-k6-profiler');
const app = express();
profile(app);//<- enable profiling

Run k6 test, then open your-backend.com/__profile

Custom path

If your app is mounted under a prefix (e.g. /api) or you're using Kubernetes/ingress routing, you can change where the profiler is exposed:

profile(app, { prefix: '/your/secret/path' });

Then open your-backend.com/your/secret/path/__profile

Tracking DB queries & heavy logic

You can track specific operations like database calls:

const { track } = require('express-k6-profiler');

app.get('/api/users/:id', async (req, res) => {
  const user = await track('my get user query',
    () => User.findById(req.params.id)
  );
  
  await track('my mapping logic',
    () => {/* a 50ms blocking work here*/}
  );

  res.json({ user });
});

Why not just use k6?

k6 tells you how slow an app is. But does not tell you:

  • which middleware is slow
  • which route is the problem
  • if the database is the bottleneck

Note

  • Adds a small overhead
  • Use in staging/testing (not production)

Status (Alpha)

Feedback and issues are highly welcome!