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

routepulse-monitor

v1.0.3

Published

Lightweight Express.js middleware for API response time tracking, slow route detection, and real-time request metrics.

Readme

routepulse-monitor

npm npm npm version license

Lightweight Express.js middleware for API response time tracking, slow route detection, and real-time request metrics.

Why routepulse-monitor? — Strong, short, memorable, modern, not over-generic, and expandable later for dashboards, metrics, analytics, and monitoring.

Installation

npm install routepulse-monitor

Quick Start

import express from "express";
import { latencyTracker } from "routepulse-monitor";

const app = express();

const { middleware, getMetrics } = latencyTracker({
  slowThreshold: 300,
  showTimestamp: true,
});

app.use(middleware);

app.get("/fast", (req, res) => {
  res.json({ ok: true });
});

app.get("/slow", (req, res) => {
  setTimeout(() => res.json({ ok: true }), 500);
});

app.get("/metrics", (req, res) => {
  res.json(getMetrics());
});

app.listen(3000);

Output

GET /fast 2ms
GET /users 32ms
POST /login 120ms
GET /dashboard 420ms ⚠ SLOW
GET /slow 502ms ⚠ SLOW

Colors indicate:

  • Green — fast (≤ 70% of threshold)
  • Yellow — moderate (> 70% of threshold)
  • Red — slow (exceeds threshold)

Options

| Option | Type | Default | Description | | -------------- | ------- | ------- | ---------------------------------- | | slowThreshold | number | 300 | Threshold in ms for slow warning | | showTimestamp | boolean | false | Show timestamp in log output | | maxHistory | number | 1000 | Max stored request entries |

Metrics Dashboard

Access real-time analytics via getMetrics():

const metrics = getMetrics();
// {
//   total: 150,
//   average: 45,
//   slow: 3,
//   slowest: { method: "GET", path: "/slow", duration: 502 },
//   routes: {
//     "GET /fast": { count: 100, totalTime: 200, avgTime: 2, slow: 0 },
//     "GET /slow": { count: 50, totalTime: 25000, avgTime: 500, slow: 50 }
//   },
//   statusBreakdown: { "200": 140, "404": 10 },
//   threshold: 300
// }

Ignored Assets

Static files are automatically skipped:

  • .css, .js, .png, .jpg, .jpeg, .gif, .ico, .svg
  • .woff, .woff2, .ttf, .eot
  • favicon.ico

Test

node test.js

License

MIT