measuring-pr-performance-impact
Measures GraphQL resolver latency changes before/after a PR merge using Datadog metrics. Use when analyzing PR performance impact, measuring latency changes, or comparing resolver performance before and after a code change.
When & Why to Use This Skill
This Claude skill automates the analysis of GraphQL resolver performance by comparing latency metrics before and after a Pull Request merge. By integrating with Datadog, it provides developers and SREs with immediate visibility into the performance impact of code changes, helping to identify latency regressions and performance bottlenecks early in the deployment cycle.
Use Cases
- Post-merge performance validation: Automatically verify if a specific PR caused a spike in GraphQL resolver latency using real-time Datadog metrics.
- Latency regression detection: Identify exactly which GraphQL resolvers are performing slower after a code update to pinpoint the root cause of performance degradation.
- Performance impact benchmarking: Compare resolver performance across different time windows (12h, 24h, or 1 week) to ensure long-term system stability after significant architectural changes.
| name | measuring-pr-performance-impact |
|---|---|
| description | Measures GraphQL resolver latency changes before/after a PR merge using Datadog metrics. Use when analyzing PR performance impact, measuring latency changes, or comparing resolver performance before and after a code change. |
Measure PR Performance Impact
Compare GraphQL resolver latency before/after a PR merge.
When to use
- "How did PR 27416 affect performance?"
- "Measure the performance impact of PR 27416"
- "Did this PR regress latency?"
CRITICAL: Always Use Bundled Scripts
YOU MUST use the bundled scripts for all operations. Do NOT use gh CLI or curl commands directly.
Scripts are located at: ~/.claude/skills/measuring-pr-performance-impact/scripts/
Workflow
Get PR info - MUST use script:
~/.claude/skills/measuring-pr-performance-impact/scripts/get_pr_info.sh <pr_number>Returns JSON with
title,mergedAt,mergedAtEpoch,filesDetermine resolvers
If user specified a resolver: Validate it exists
- Run
list_resolvers.shto get valid resolver names - Check if specified resolver exists (case-insensitive)
- If not found: Use
AskUserQuestionto suggest close matches (resolvers containing similar substrings) - Example: "Resolver 'pricehistry' not found. Did you mean one of these?"
If user did NOT specify a resolver: Auto-detect
- Run
Measure impact - MUST use script (supports comma-separated resolvers):
~/.claude/skills/measuring-pr-performance-impact/scripts/measure_impact.sh <resolver[,resolver2,...]> <merged_epoch> [window_hours]Window parameter:
- Default:
12(12 hours before and after merge) - Common values:
12(12h),24(1 day),168(1 week) - If PR was recently merged, "after" window will be truncated to now
Outputs pre-formatted output with Unicode box drawing and aligned columns.
- Default:
Display output - Your response should be ONLY:
a. One line with PR title and merge time b. The script output EXACTLY as-is (no code block needed - just paste it directly)
DO NOT ADD:
- "Key findings" or analysis
- Your own summary or commentary
- Reformatted tables
- Any text after the script output
The script output is self-explanatory and beautifully formatted. Let it speak for itself.
Error handling
- PR not merged: "PR #X has not been merged yet"
- PR not found: "PR #X not found or no access"
- No data: "No metrics found for resolver X"
- Missing creds: "Datadog credentials not found in ~/.dogrc"