Skip to content

Add OhMyPerf to Timeline, Tracing & Profiling#186

Open
hoainho wants to merge 1 commit into
ChromeDevTools:masterfrom
hoainho:add-ohmyperf
Open

Add OhMyPerf to Timeline, Tracing & Profiling#186
hoainho wants to merge 1 commit into
ChromeDevTools:masterfrom
hoainho:add-ohmyperf

Conversation

@hoainho
Copy link
Copy Markdown

@hoainho hoainho commented May 20, 2026

Adds OhMyPerf under DevTools tooling and ecosystem → Timeline, Tracing & Profiling — a real-Chromium Core Web Vitals measurement tool that drives Chromium through the DevTools Protocol via Playwright + raw CDP.

Why this list fits

OhMyPerf's value comes from using CDP correctly, not from being yet another performance dashboard:

  • Target.setAutoAttach({flatten: true}) for cross-origin OOPIF inspection. Each cross-origin iframe gets its own CDPSession via Playwright's context.newCDPSession(frame). We hit ~99% iframe coverage and verified it against real-world embedded surfaces (mdnplay.dev, openstreetmap.org, example.org).
  • Performance.getMetrics + Input.dispatchMouseEvent + web-vitals/attribution for honest LCP/INP/CLS measurement on user hardware. INP is measurable in CI because we synthesize a trusted-event interaction via CDP rather than relying on a human click.
  • longtask PerformanceObserver + Network.requestWillBeSent joined back to script URL for long-task attribution down to the file path.
  • Mann-Whitney U regression detection against a baseline report at α=0.05 with per-metric noise floors (avoids the flake-prone fixed-threshold pattern that plagues Lighthouse-CI gates).

What's distinct from existing entries

The closest existing entry under Timeline/Tracing/Profiling is DevTools Timeline Viewer (chromedevtools.github.io/timeline-viewer/), which is read-only and viewer-focused. OhMyPerf is on the production side: it actually drives the browser, records the trace, computes CWV + diagnostics, and produces a structured report consumable by both humans and LLM agents.

Most CDP-driver entries in the list (Puppeteer, Playwright, the high-level libraries section) are primitives — OhMyPerf is an application of those primitives specifically for CWV measurement, and exposes them through an MCP server so LLM agents can call measure → propose_patch → verify_fix end-to-end.

Status

  • Apache-2.0
  • @ohmyperf/cli and @ohmyperf/mcp-server published on npm
  • 387 tests across 18 workspaces, all green
  • Real-world validated against 10 production sites
  • Public repo: https://github.com/hoainho/ohmyperf

Thanks for maintaining this list — the CDP ecosystem has been hard to navigate for years and this is the canonical entry point.

OhMyPerf drives Chromium through the DevTools Protocol via Playwright +
raw CDP, specifically:

- Target.setAutoAttach({flatten: true}) for cross-origin OOPIF
  inspection with per-frame CDPSession (~99% coverage). The motivating
  pattern is the same as awesome-puppeteer's nested-frame chapter but
  generalized to any cross-origin iframe — including the practical
  mdnplay.dev / openstreetmap.org / example.org cases.

- Performance.getMetrics + Input.dispatchMouseEvent + 'web-vitals'
  PerformanceObserver pipeline for honest LCP/INP/CLS measurement on
  real hardware (not synthetic Lighthouse-CI in a datacenter).

- long-task attribution via 'longtask' PerformanceObserver +
  Network.requestWillBeSent capture, joined back to the script URL.

- Mann-Whitney U statistical regression detection against a baseline
  report (alpha=0.05 default), with per-metric noise floors so noisy
  measurements stop reporting false-positive regressions.

Plus an MCP server (Model Context Protocol) so LLM agents can call
the full 'measure -> propose_patch -> verify_fix' fix loop directly.

Apache-2.0, runs both locally (npx -y @ohmyperf/cli) and as a hosted
service. Tested with Claude Desktop, OpenCode, Cursor, Cline.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant