# Performance Investigation

> Diagnose latency, throughput, CPU, memory, allocation, lock contention, storage, and network regressions with measurement-first analysis. Use for benchmarks, profiles, scalability limits, and production performance problems.

- Skill: `iamhrithikraj/performance-investigation` (Agent Skill)
- Install (CLI): `npx skillmds@latest add iamhrithikraj/performance-investigation`
- Raw SKILL.md: https://api.skillmd.com/api/skills/iamhrithikraj/performance-investigation/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: iamHrithikRaj (https://skillmd.com/u/iamhrithikraj)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/iamhrithikraj/performance-investigation

---


# Performance investigation

## Define the problem

Record:

- User-visible metric and target.
- Baseline and regression size.
- Workload, concurrency, dataset, and environment.
- Measurement window and statistical variation.
- Relevant code, configuration, dependency, or traffic changes.

Do not compare results produced by materially different workloads.

## Decompose the cost

Break the path into:

- Queueing and scheduling.
- CPU and instruction cost.
- Allocation and memory pressure.
- Synchronization and contention.
- Storage and filesystem I/O.
- Network transfer and remote dependency time.
- Retries, timeouts, and duplicated work.

## Gather evidence

Prefer:

- Profiles and traces.
- Histograms and percentiles.
- Hardware and runtime counters.
- Allocation and lock-contention data.
- Controlled A/B experiments.

Avoid optimizing from intuition or isolated microbenchmarks.

## Recommend an optimization

Include:

1. Identified bottleneck.
2. Supporting measurement.
3. Proposed change.
4. Expected effect and assumptions.
5. Correctness and operational risks.
6. Benchmark and production validation plan.
7. Rollback or disablement strategy.


