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

@zeitzeuge/node

v0.1.1

Published

Node.js test runner integration for performance analysis powered by zeitzeuge.

Readme

@zeitzeuge/node

Custom reporter for the Node.js built-in test runner (node --test) that collects V8 CPU profiles and runs AI-powered performance analysis on your application code.

Installation

npm install @zeitzeuge/node

Quick Start

Run your tests with CPU profiling enabled and the zeitzeuge reporter:

node --test \
  --cpu-prof --cpu-prof-dir=.zeitzeuge-profiles \
  --test-reporter @zeitzeuge/node/reporter \
  --test-reporter-destination stdout \
  tests/*.test.js

A Markdown report is written to zeitzeuge-report.md with findings and suggested fixes.

Heads-up — cost & runtime impact

Zeitzeuge profiles every test file, analyzes the results with an LLM, and produces a report. Depending on the size of your project this can add 60 seconds or more to each test run and consumes API tokens. It is designed as an investigation tool, not something you run on every commit.

Recommended: on-demand profiling

Create a script in package.json so profiling only runs when you explicitly opt in:

{
  "scripts": {
    "test": "node --test tests/*.test.js",
    "test:profile": "node --test --cpu-prof --cpu-prof-dir=.zeitzeuge-profiles --test-reporter @zeitzeuge/node/reporter --test-reporter-destination stdout tests/*.test.js"
  }
}
npm test                # regular run — no profiling, no LLM cost
npm run test:profile    # profiles tests + generates AI report

Configuration

The reporter is configured via environment variables:

| Variable | Default | Description | | ------------------------ | --------------------- | ------------------------------------------- | | ZEITZEUGE_PROFILE_DIR | .zeitzeuge-profiles | Directory for temporary .cpuprofile files | | ZEITZEUGE_OUTPUT | zeitzeuge-report.md | Path for the Markdown report | | ZEITZEUGE_PROJECT_ROOT | process.cwd() | Project root for classifying code | | ZEITZEUGE_VERBOSE | false | Enable debug logging ("true" to enable) | | ZEITZEUGE_ANALYZE | true | Run AI analysis ("false" to disable) |

How It Works

  1. Instruments the test runner--cpu-prof tells Node.js to write V8 CPU profiles for each forked test process
  2. Custom reporter collects timing — the reporter consumes test:pass, test:fail, and test:summary events to extract per-test timing data
  3. Correlates profiles with test files.cpuprofile files are matched to test files by execution order
  4. Classifies hot functions — every profiled function is categorized as application, dependency, test, or framework
  5. Deep Agent analyzes your application code — focuses on bottlenecks in the code you wrote, not test infrastructure overhead

Programmatic API

You can use the analysis pipeline programmatically:

import {
  parseCpuProfile,
  classifyScript,
  computeMetrics,
  createNodeTestWorkspace,
  analyzeTestPerformance,
} from '@zeitzeuge/node';

Exports

| Export | Description | | ------------------------- | -------------------------------------------------------------------- | | zeitZeugeReporter | Async generator reporter for node --test | | analyzeTestPerformance | Run the Deep Agent analysis pipeline | | NODE_TEST_SYSTEM_PROMPT | System prompt used for the Node.js test analysis | | computeMetrics | Compute performance metrics from test timing and profile data | | parseCpuProfile | Parse a V8 .cpuprofile file into a structured summary | | createNodeTestWorkspace | Build the workspace context sent to the analysis agent | | mergeHotFunctions | Merge and deduplicate hot functions across profiles | | classifyScript | Classify a script URL as application, dependency, test, or framework |

Requirements

  • Node.js >= 22 (for stable node:test with process isolation)
  • An LLM API key (OPENAI_API_KEY or ANTHROPIC_API_KEY)

Related packages