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

@rudderjs/pulse

v4.0.3

Published

Application performance monitoring for RudderJS — aggregates request throughput, queue metrics, cache hit rates, exceptions, active users, slow queries, and server resource usage.

Downloads

1,101

Readme

@rudderjs/pulse

Application performance monitoring for RudderJS — aggregates request throughput, queue metrics, cache hit rates, exceptions, active users, slow queries, and server resource usage.

Installation

pnpm add @rudderjs/pulse

Setup

// bootstrap/providers.ts
import { pulse } from '@rudderjs/pulse'
import configs from '../config/index.js'
export default [..., pulse(configs.pulse), ...]

Pulse Facade

import { Pulse } from '@rudderjs/pulse'

// Record a metric
Pulse.record('request_duration', 142)
Pulse.record('cache_hits', 1, 'user-cache')

// Query aggregates
const since = new Date(Date.now() - 3600_000) // last hour
const requestMetrics = await Pulse.aggregates('request_count', since)
const cacheMetrics   = await Pulse.aggregates('cache_hits', since, 'user-cache')

// Get entries (slow requests, exceptions, etc.)
const slowRequests = await Pulse.entries('slow_request', { perPage: 25 })

// Overview of all metrics
const overview = await Pulse.overview(since)

Pulse Methods

| Method | Returns | Description | |--------|---------|-------------| | record(type, value, key?) | void | Increment an aggregate bucket | | aggregates(type, since, key?) | PulseAggregate[] | Aggregates for a metric type within a period | | entries(type, options?) | PulseEntry[] | Individual entries (slow requests, exceptions) | | overview(since) | PulseAggregate[] | All aggregates since a given date |

Metric Types

| Type | Source | |------|--------| | request_count | Request middleware | | request_duration | Request middleware | | queue_throughput | Queue aggregator | | queue_wait_time | Queue aggregator | | cache_hits / cache_misses | Cache aggregator | | exceptions | Exception aggregator | | active_users | User aggregator middleware | | server_cpu / server_memory | Server aggregator (periodic) |

Storage Drivers

  • memory (default) — In-process, capped at maxEntries. Good for development.
  • sqlite — Persistent storage via better-sqlite3. Run pnpm add better-sqlite3 to enable.

Configuration

// config/pulse.ts
export default {
  enabled: true,
  path: 'pulse',
  storage: 'memory',
  sqlitePath: '.pulse.db',
  pruneAfterHours: 168,            // 7 days
  slowRequestThreshold: 1000,      // ms
  slowQueryThreshold: 100,         // ms
  recordRequests: true,
  recordQueues: true,
  recordCache: true,
  recordExceptions: true,
  recordUsers: true,
  recordServers: true,
  serverStatsIntervalMs: 15_000,
  auth: null,
} satisfies PulseConfig

Aggregators

Pulse auto-registers aggregators based on config:

  • RequestAggregator — Tracks request throughput and duration via middleware
  • QueueAggregator — Tracks queue throughput and wait times
  • CacheAggregator — Tracks cache hit/miss rates
  • ExceptionAggregator — Counts unhandled exceptions
  • QueryAggregator — Records slow database queries
  • UserAggregator — Tracks unique active users via middleware
  • ServerAggregator — Periodically records CPU and memory usage

Notes

  • Auto-prune runs on a background interval.
  • Optional peers: @rudderjs/log, @rudderjs/orm, @rudderjs/cache, @rudderjs/queue.
  • Dashboard served at /{path} with auto-refreshing metric cards.