Skip to content

About

Frame-timing lag/hitch analyzer and display performance diagnostic suite (D/LDC2 libraries, CLI, and Tauri v2 + SolidJS desktop GUI)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Perfalyzer

Modular frame-timing analyzer and display performance diagnostic suite built with D (LDC2) libraries & CLI and a Tauri v2 + SolidJS desktop GUI.

What It Solves

In-game FPS counters often stay pinned at 144 FPS even while gameplay visibly hitches, stutters, or feels "wavy" and mushy — caused by capture/overlay DXGI hooks (Medal.tv, Game Bar, Discord, Overwolf), VRR/FreeSync boundary drops, alt-tab PresentMode composition switches, or dynamic FPS limiters (AMD Radeon Chill).

Perfalyzer approaches this as a modular suite:

  1. Recording Frame-Timing Analyzer (perfalyzer:video)
    • Layer 1 (ffprobe): Stream metadata, CFR vs. VFR detection, and per-frame presentation timestamp (PTS) gap detection (isolating recorder/encoder drops).
    • Layer 2 (ffmpeg streaming pipe → native D): Decodes downscaled grayscale frames directly over a pipe (zero temp files) and runs LLVM-compiled MAD, high-diff pixel ratio, and coarse block-motion analysis.
    • Motion-Gated Duplicate Detection: Catches game freezes hidden inside Constant Frame Rate (CFR) 60 fps recordings when repeated frames occur between active motion, without false positives on menus or static pauses.
    • Honest Capture-Rate Calibration: Explicitly reports what a 60 fps capture can and cannot resolve for a 144 Hz game (~33 ms+ hitches vs. sub-16.7 ms micro-jitters).
  2. PresentMon CSV & A/B Comparison (perfalyzer:core)
    • Parses PresentMon v1/v2 CSVs for sub-millisecond 144/240/360 Hz frametime percentiles, 1% / 0.1% lows, and Hardware: Independent Flip → Composed: Flip transitions.
    • Generates side-by-side A/B proof reports (e.g., game without Medal vs. game with Medal overlay).
  3. Vanguard-Safe User-Mode System Culprit Diagnostics (perfalyzer:diagnostics)
    • Zero kernel drivers, zero DLL injection, zero OpenProcess handles to games.
    • Checks active capture/overlay pipelines, Windows Game Mode & Xbox Game DVR registry state, DWM MPO overrides, display refresh rates & multi-monitor VRR caps, third-party storage cache minifilters (e.g., PrimoCache), and 30-day Windows WHEA-Logger hardware error logs.

Architecture

perfalyzer/
├── dub.sdl                   # Root D package + CLI executable (uses prohelp + help.sdl)
├── help.sdl                  # Single canonical OpenShellOrg CLI help schema
├── source/app.d              # CLI entrypoint
├── libs/
│   ├── core/                 # perfalyzer:core — metrics, PresentMon parser, JSON/Markdown export
│   ├── video/                # perfalyzer:video — ffprobe/ffmpeg discovery, PTS & visual hitch engine
│   └── diagnostics/          # perfalyzer:diagnostics — Vanguard-safe Windows user-mode culprit probes
└── apps/
    └── desktop/              # Tauri v2 + SolidJS + Tailwind v4 + self-hosted Fontsource fonts

Quick Start

Build D Libraries & CLI (LDC2 recommended)

dub test :core --compiler=ldc2
dub test :video --compiler=ldc2
dub build --compiler=ldc2 --build=release

CLI Usage

# Interactive/progressive help (via prohelp)
.\bin\perfalyzer.exe ?

# Verify ffprobe/ffmpeg auto-discovery (including WinGet Packages)
.\bin\perfalyzer.exe doctor

# Analyze a screen recording (60fps clip of a 144Hz game)
.\bin\perfalyzer.exe analyze clip.mp4 --fps-game 144
.\bin\perfalyzer.exe analyze clip.mp4 --fps-game 144 --markdown --out evidence.md

# Run Vanguard-safe live Windows culprit diagnostics
.\bin\perfalyzer.exe diagnose

# Compare two PresentMon CSV captures (A/B proof)
.\bin\perfalyzer.exe presentmon no-medal.csv --compare with-medal.csv

Run Desktop GUI (Tauri v2 + SolidJS)

cd apps/desktop
pnpm install
pnpm tauri dev

License

MIT

About

Frame-timing lag/hitch analyzer and display performance diagnostic suite (D/LDC2 libraries, CLI, and Tauri v2 + SolidJS desktop GUI)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages