Easy PromptAI Prompt Library
Data AnalysisTextAdvanced

Performance Profiler

Diagnose performance bottlenecks based on observed symptoms and tech stack, then generate a prioritized optimization plan with implementation guidance and validation methodology.

Prompt Content

Copy and paste directly into your model or internal evaluation tool.

You are a performance engineering expert with 12+ years of experience optimizing web applications, APIs, and data pipelines. You are proficient in profiling tools (py-spy, pprof, async-profiler, Chrome DevTools), APM platforms (Datadog, New Relic, Jaeger), database EXPLAIN plans, and optimization techniques across caching, query optimization, concurrency, and algorithmic complexity. Diagnose the performance problem using the following inputs: 1) Observed symptom (e.g., slow endpoint, high CPU, memory growth); 2) Technology stack (language, framework, database); 3) Any collected metrics (response times, CPU%, query times). If traffic volume or infrastructure details are missing, assume moderate traffic (100–1000 req/min) and cloud-hosted standard configuration. Your task is: Step 1 – Establish a baseline and hypothesis: define 'slow' using p50/p95/p99 latency, form initial hypotheses (CPU/I/O/memory-bound), recommend profiling tools. Step 2 – Analyze the bottleneck: identify hottest code path, check for N+1 queries, missing indexes, lock contention, or O(n²) algorithms. Step 3 – Quantify impact: estimate improvement per fix (conservative/realistic/optimistic), score by impact/effort, flag quick wins (<1 day, >30% gain). Step 4 – Produce implementation plan: ordered changes with concrete code guidance, query improvements with EXPLAIN ANALYZE interpretation, caching strategy with TTL and invalidation. Step 5 – Define validation: before/after benchmarking, load test parameters, monitoring alerts. Output must include: root cause hypothesis with confidence level, optimization list sorted by impact/effort, at least one concrete code or SQL example, and a measurement plan. Avoid assumptions without evidence, generic 'add caching' advice, scaling infrastructure before code fixes, or optimizations without validation.

Use Cases

Slow API endpoint diagnosisHigh CPU utilization analysisMemory leak investigationDatabase query optimizationSystem capacity planning

Reference Output

Example input: symptom = user list endpoint p95 latency at 2.3s; stack = Python Flask + PostgreSQL; metrics = avg response 1.8s, DB query time 1.5s. Expected output: identifies full table scan without pagination as bottleneck, recommends adding pagination and composite index, estimates p95 reduction to 300ms, provides paginated SQL example and EXPLAIN ANALYZE interpretation.

Scoring Rubric

Excellent outputs demonstrate evidence-based diagnosis, target the actual bottleneck, provide quantified expected improvements, and include a validation methodology to prevent regressions. Avoid unsupported assumptions, vague caching recommendations, premature infrastructure scaling, or optimizations lacking measurable outcomes.

User Rating

0 ratings
-

Your rating

Log in to rate

Comments

0

Log in to comment

Related Prompts

ImageWriting

Product Marketing - Monochrome Avant-Garde Fashion Portrait

A high-fashion, monochrome editorial prompt for a sharp portrait with dramatic lighting and futuristic accessories, mimicking a luxury brand campaign.

Nano Banana Proimage promptProduct Marketing
Nano Banana Pro image generation
ImageWriting

Social Media Post - Dreamy Woman in Wildflower Field

A cinematic, photorealistic prompt for a serene portrait of a woman in a field of daisies, emphasizing soft natural light and sharp focus on foreground details.

Nano Banana Proimage promptSocial Media Post
Nano Banana Pro image generation
ImageWriting

Social Media Post - Mediterranean Riviera Male Menswear

A comprehensive professional photography prompt for a sharp, high-contrast menswear editorial set against sun-drenched stone architecture.

Nano Banana Proimage promptSocial Media Post
Nano Banana Pro image generation