performance-profiling

Profile PHP, Next.js, and MySQL performance bottlenecks with endpoint timing and k6 load tests.

Updated Mar 7, 2026
One-click install
npx skills add https://github.com/billyfranklim1/claude-skills --skill performance-profiling-billyfranklim1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-profiling
Source: https://github.com/billyfranklim1/claude-skills/tree/main/plugins/performance-profiling/skills/performance-profiling
Command: npx skills add https://github.com/billyfranklim1/claude-skills --skill performance-profiling-billyfranklim1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pinpoints where server-side latency and resource bottlenecks occur when HTTP endpoints are slow, CPU or memory spikes appear, or logs do not reveal a clear root cause, enabling targeted fixes before or after traffic increases.

Core Features & Use Cases

  • Quick diagnostics: endpoint timing, PHP-FPM worker counts, process CPU/memory snapshots, and open MySQL connections to locate hot processes fast.
  • Load testing & SLO validation: guidance and k6/ab examples to simulate traffic, measure P95 latency, and validate capacity before campaigns or releases.
  • Deep profiling: temporary Xdebug profiling, analysis of Xdebug/trace outputs, and techniques for finding N+1 queries and slow MySQL statements using slow logs and pt-query-digest.
  • Frontend/SSR and cache checks: Next.js SSR timing, systemd logs inspection, Redis hit-rate analysis, and live monitoring patterns during tests.
  • Use Case: Before a paid acquisition push, run latency snapshots and a k6 smoke test to confirm P95 < 1s and identify whether PHP-FPM tuning, query optimization, or Redis caching is needed.

Quick Start

Use the performance-profiling skill to run endpoint latency checks, a k6 smoke test, and identify the top PHP or MySQL hotspots causing elevated P95 or CPU load.

Frequently Asked Questions about performance-profiling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose slow PHP and MySQL bottlenecks in my web application?

Diagnose PHP and MySQL bottlenecks by capturing endpoint timing, checking PHP-FPM worker counts, analyzing MySQL slow logs with pt-query-digest, and running temporary Xdebug traces to pinpoint slow statements.

What is the best way to load test and validate P95 latency before a traffic spike?

Validate P95 latency before traffic spikes by running k6 load tests to simulate traffic, measuring endpoint response times, and inspecting Redis cache hit rates to ensure capacity meets SLO targets.

How do I find N+1 queries causing high CPU usage in my Next.js SSR application?

Find N+1 queries causing high CPU usage by inspecting Next.js SSR timing, reviewing MySQL slow logs, and analyzing process CPU snapshots to locate hot processes generating excessive database calls.

Can I use Xdebug profiling on production servers to trace slow HTTP endpoints?

You can use temporary Xdebug profiling on production servers to trace slow HTTP endpoints, capturing detailed function call traces to identify exact PHP execution hotspots without permanently impacting live performance.

Why does my PHP-FPM worker count spike and how do I monitor open MySQL connections?

PHP-FPM worker counts spike due to slow HTTP endpoints or external delays, which you can investigate by taking process CPU snapshots and checking open MySQL connections to locate resource exhaustion.