performance-profiling

Diagnose latency, memory, and concurrency bottlenecks with baseline-first profiling and before/after benchmark evidence.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/vesviet/agent-skills --skill performance-profiling-vesviet
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: performance-profiling
Source: https://github.com/vesviet/agent-skills/tree/main/core/skills/foundation/performance-profiling
Command: npx skills add https://github.com/vesviet/agent-skills --skill performance-profiling-vesviet

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Slow endpoints, growing memory usage, and unexplained CPU spikes are hard to fix without evidence. This Skill enforces a baseline-first profiling workflow so every optimization is backed by before/after measurements instead of guesswork. ## Core Features & Use Cases - Evidence-Based Optimization: Requires a recorded baseline and p50/p95/p99 before/after comparison before any optimization is merged. - Hot Path Identification: Guides profiling with language-native tools, flame graphs, eBPF continuous profiling (Pyroscope), and trace correlation via trace_id. - AI Inference Profiling: Covers GPU metrics (VRAM, KV cache, TTFT), batch fill efficiency, embedding cache hit rates, and per-request inference cost. - Use Case: A service's p99 latency doubled after a release. Use this Skill to reproduce the workload, profile the hot path, test a narrow hypothesis (e.g., an N+1 query), and validate the fix with repeatable measurements. ## Quick Start Use the performance-profiling skill to investigate why this endpoint's latency spiked and produce a before/after benchmark report.

Frequently Asked Questions about performance-profiling

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

FAQPage Schema
How do I profile a slow API endpoint before optimizing it?▼

Record a baseline first: capture p50/p95/p99 latency, throughput, error rate, and CPU/memory under a repeatable workload. Then profile the hot path with language-native profilers or flame graphs, test one narrow hypothesis, and re-measure before merging any change.

What tools should I use for continuous profiling in production?▼

Use eBPF-based zero-instrumentation profilers such as Pyroscope or the OpenTelemetry Profiling SIG for always-on profiling. Keep overhead under 1.5% CPU with bounded memory, get explicit approval, and ensure profiling endpoints are access-controlled.

How do I profile LLM and GPU inference latency?▼

Measure model latency p50/p95/p99 separately from service latency, since LLM calls often dominate. For GPU services like vLLM or Ollama, profile GPU utilization, VRAM, KV cache hit rate, and time-to-first-token using nvitop or PyTorch Profiler.

Why is mean latency misleading when reporting performance improvements?▼

The mean can improve while tail latency worsens, hiding user-facing regressions. Always report p50, p95, and p99 before and after a change, and treat tail regressions as release-blocking issues.

When should I not run a profiler in production?▼

Avoid production profiling without explicit approval and a safety plan. Use the least invasive method, keep duration short, enforce the 1.5% CPU overhead limit, and coordinate with service owners when the workload is customer-facing.