zeitzeuge mascot

AI-Powered Performance Analysis

Capture V8 heap snapshots, Chrome runtime traces, and CPU profiles — hand them to a Deep Agent that finds bottlenecks and suggests code-level fixes.

Features

Page-Load Analysis

Launch Chrome, capture heap snapshots, performance traces, runtime traces, and all network assets in a single page load.

Test Runner Integrations

Profile your test suite with Vitest, Node.js test runner, or Bun — V8 CPU profiling and AI analysis of your application code.

Deep Agent Investigation

A LangChain Deep Agent autonomously browses a virtual filesystem, reads source code, and correlates heap + trace + runtime data.

Code-Level Fixes

Get actionable suggestions — memory leaks, frame-blocking functions, listener leaks, render-blocking scripts — with line-number precision.

Runtime Trace Analysis

Captures every function call, event dispatch, layout, paint, and GC event on the main thread via the Chrome Tracing domain.

Zero Config

Set an API key, run npx zeitzeuge <url> — done. For test runners, add one plugin line or CLI flag.

How It Works

  1. 1

    Launches Chrome via WebdriverIO with DevTools Protocol access

  2. 2

    Captures heap snapshot + performance trace + runtime trace + network assets

  3. 3

    Builds a VFS workspace with all captured data

  4. 4

    Deep Agent explores the workspace and correlates findings

  5. 5

    Markdown report written to disk with code-level fixes

What It Finds

🌐 Page Load

  • Memory leaks, detached DOM nodes, closure leaks
  • Render-blocking scripts & stylesheets
  • Long main-thread tasks (> 50ms)
  • Frame-blocking functions with exact source locations
  • Event listener leaks
  • GC pressure & layout thrashing

Test Runners

Vitest · Node.js · Bun

  • Hot functions with high self time in your source code
  • Expensive algorithms (O(n²) loops, redundant computation)
  • Dependency bottlenecks
  • GC pressure from short-lived allocations
  • Event listener leaks
  • Blocking I/O in hot paths

Quick Start

CLI

# Set your API key
export OPENAI_API_KEY=sk-...

# Analyze any URL
npx zeitzeuge http://localhost:3000

Vitest

// vitest.config.ts
import { defineConfig } from 'vitest/config';
import { zeitzeuge } from '@zeitzeuge/vitest';

export default defineConfig({
  plugins: [zeitzeuge()],
});

Node.js Test Runner

# Run with CPU profiling + zeitzeuge reporter
node --test \
  --cpu-prof --cpu-prof-dir=.zeitzeuge-profiles \
  --test-reporter @zeitzeuge/node/reporter \
  --test-reporter-destination stdout \
  tests/*.test.js

Bun

// scripts/profile-tests.ts
import { analyzeTestRun } from '@zeitzeuge/bun';

await Bun.$`bun test`;
await analyzeTestRun();