Triggers
- performance benchmark
- load testing
- stress testing
- Core Web Vitals
- page speed
- response time
- throughput testing
- scalability test
- performance optimization
- capacity planning
- LCP optimization
- performance budget
- endurance testing
- performance SLA
- bottleneck analysis
Instructions
Performance Baseline and Requirements
- Establish current performance baselines across all system components using
shell_execute
- Define performance requirements and SLA targets with stakeholder alignment
- Identify critical user journeys and high-impact performance scenarios
- Set up performance monitoring infrastructure and data collection
- Use
browser_navigate for Core Web Vitals measurement
Comprehensive Testing Strategy
- Design test scenarios covering load, stress, spike, and endurance testing
- Create realistic test data and user behavior simulation
- Plan test environment setup that mirrors production characteristics
- Implement statistical analysis methodology for reliable results
Performance Analysis and Optimization
- Execute comprehensive performance testing with detailed metrics collection
- Identify bottlenecks through systematic analysis of results
- Provide optimization recommendations with cost-benefit analysis
- Validate optimization effectiveness with before/after comparisons
- Use
knowledge_write to store performance baselines and optimization patterns
Core Web Vitals Optimization
- Optimize for Largest Contentful Paint (LCP < 2.5s)
- Optimize for First Input Delay (FID < 100ms)
- Optimize for Cumulative Layout Shift (CLS < 0.1)
- Implement code splitting, lazy loading, and CDN optimization
- Monitor Real User Monitoring (RUM) data alongside synthetic metrics
- Use
web_search for performance optimization techniques and benchmarks
Methodology Standards
- Always establish baseline performance before optimization attempts
- Use statistical analysis with confidence intervals for measurements
- Test under realistic load conditions simulating actual user behavior
- Consider performance impact of every optimization recommendation
- Prioritize user-perceived performance over technical metrics alone
- Test across different network conditions and device capabilities
Deliverables
Performance Analysis Report Template
# [System Name] Performance Analysis Report
## Performance Test Results
**Load Testing**: [Normal load performance with detailed metrics]
**Stress Testing**: [Breaking point analysis and recovery behavior]
**Scalability Testing**: [Performance under increasing load scenarios]
**Endurance Testing**: [Long-term stability and memory leak analysis]
## Core Web Vitals Analysis
**Largest Contentful Paint**: [LCP measurement with optimization recommendations]
**First Input Delay**: [FID analysis with interactivity improvements]
**Cumulative Layout Shift**: [CLS measurement with stability enhancements]
**Speed Index**: [Visual loading progress optimization]
## Bottleneck Analysis
**Database Performance**: [Query optimization and connection pooling analysis]
**Application Layer**: [Code hotspots and resource utilization]
**Infrastructure**: [Server, network, and CDN performance analysis]
**Third-Party Services**: [External dependency impact assessment]
## Performance ROI Analysis
**Optimization Costs**: [Implementation effort and resource requirements]
**Performance Gains**: [Quantified improvements in key metrics]
**Business Impact**: [User experience improvement and conversion impact]
**Cost Savings**: [Infrastructure optimization and efficiency gains]
## Optimization Recommendations
**High-Priority**: [Critical optimizations with immediate impact]
**Medium-Priority**: [Significant improvements with moderate effort]
**Long-Term**: [Strategic optimizations for future scalability]
---
**Performance Status**: [MEETS/FAILS SLA requirements]
**Scalability Assessment**: [Ready/Needs Work for projected growth]
k6 Load Test Configuration
export const options = {
stages: [
{ duration: '2m', target: 10 }, // Warm up
{ duration: '5m', target: 50 }, // Normal load
{ duration: '2m', target: 100 }, // Peak load
{ duration: '5m', target: 100 }, // Sustained peak
{ duration: '2m', target: 200 }, // Stress test
{ duration: '3m', target: 0 }, // Cool down
],
thresholds: {
http_req_duration: ['p(95)<500'],
http_req_failed: ['rate<0.01'],
},
};
Success Metrics
- 95% of systems consistently meet or exceed performance SLA requirements
- Core Web Vitals scores achieve "Good" rating for 90th percentile users
- Performance optimization delivers 25% improvement in key user experience metrics
- System scalability supports 10x current load without significant degradation
- Performance monitoring prevents 90% of performance-related incidents
Verify
- The test suite was actually executed and exit code/output is captured in the transcript, not just authored
- Pass/fail counts are reported as numbers (e.g., '42 passed, 0 failed'), not 'all tests pass'
- New tests cover at least one negative/edge case in addition to the happy path; the cases are listed
- Coverage delta or affected modules are reported when the project tracks coverage; a baseline number is cited
- For flaky or timing-sensitive tests, the run was repeated at least 3 times and pass-rate is reported
- Any skipped or xfail tests introduced are listed with a reason and an issue/TODO link
1---2name: performance-benchmarking3description: Measure, analyze, and improve system performance with load testing, Core Web Vitals optimization, and capacity planning. Adapted from msitarzewski/agency-agents.4---56## Triggers78- performance benchmark9- load testing10- stress testing11- Core Web Vitals12- page speed13- response time14- throughput testing15- scalability test16- performance optimization17- capacity planning18- LCP optimization19- performance budget20- endurance testing21- performance SLA22- bottleneck analysis2324## Instructions2526### Performance Baseline and Requirements27- Establish current performance baselines across all system components using `shell_execute`28- Define performance requirements and SLA targets with stakeholder alignment29- Identify critical user journeys and high-impact performance scenarios30- Set up performance monitoring infrastructure and data collection31- Use `browser_navigate` for Core Web Vitals measurement3233### Comprehensive Testing Strategy34- Design test scenarios covering load, stress, spike, and endurance testing35- Create realistic test data and user behavior simulation36- Plan test environment setup that mirrors production characteristics37- Implement statistical analysis methodology for reliable results3839### Performance Analysis and Optimization40- Execute comprehensive performance testing with detailed metrics collection41- Identify bottlenecks through systematic analysis of results42- Provide optimization recommendations with cost-benefit analysis43- Validate optimization effectiveness with before/after comparisons44- Use `knowledge_write` to store performance baselines and optimization patterns4546### Core Web Vitals Optimization47- Optimize for Largest Contentful Paint (LCP < 2.5s)48- Optimize for First Input Delay (FID < 100ms)49- Optimize for Cumulative Layout Shift (CLS < 0.1)50- Implement code splitting, lazy loading, and CDN optimization51- Monitor Real User Monitoring (RUM) data alongside synthetic metrics52- Use `web_search` for performance optimization techniques and benchmarks5354### Methodology Standards55- Always establish baseline performance before optimization attempts56- Use statistical analysis with confidence intervals for measurements57- Test under realistic load conditions simulating actual user behavior58- Consider performance impact of every optimization recommendation59- Prioritize user-perceived performance over technical metrics alone60- Test across different network conditions and device capabilities6162## Deliverables6364### Performance Analysis Report Template6566```markdown67# [System Name] Performance Analysis Report6869## Performance Test Results70**Load Testing**: [Normal load performance with detailed metrics]71**Stress Testing**: [Breaking point analysis and recovery behavior]72**Scalability Testing**: [Performance under increasing load scenarios]73**Endurance Testing**: [Long-term stability and memory leak analysis]7475## Core Web Vitals Analysis76**Largest Contentful Paint**: [LCP measurement with optimization recommendations]77**First Input Delay**: [FID analysis with interactivity improvements]78**Cumulative Layout Shift**: [CLS measurement with stability enhancements]79**Speed Index**: [Visual loading progress optimization]8081## Bottleneck Analysis82**Database Performance**: [Query optimization and connection pooling analysis]83**Application Layer**: [Code hotspots and resource utilization]84**Infrastructure**: [Server, network, and CDN performance analysis]85**Third-Party Services**: [External dependency impact assessment]8687## Performance ROI Analysis88**Optimization Costs**: [Implementation effort and resource requirements]89**Performance Gains**: [Quantified improvements in key metrics]90**Business Impact**: [User experience improvement and conversion impact]91**Cost Savings**: [Infrastructure optimization and efficiency gains]9293## Optimization Recommendations94**High-Priority**: [Critical optimizations with immediate impact]95**Medium-Priority**: [Significant improvements with moderate effort]96**Long-Term**: [Strategic optimizations for future scalability]9798---99**Performance Status**: [MEETS/FAILS SLA requirements]100**Scalability Assessment**: [Ready/Needs Work for projected growth]101```102103### k6 Load Test Configuration104105```javascript106export const options = {107 stages: [108 { duration: '2m', target: 10 }, // Warm up109 { duration: '5m', target: 50 }, // Normal load110 { duration: '2m', target: 100 }, // Peak load111 { duration: '5m', target: 100 }, // Sustained peak112 { duration: '2m', target: 200 }, // Stress test113 { duration: '3m', target: 0 }, // Cool down114 ],115 thresholds: {116 http_req_duration: ['p(95)<500'],117 http_req_failed: ['rate<0.01'],118 },119};120```121122## Success Metrics123124- 95% of systems consistently meet or exceed performance SLA requirements125- Core Web Vitals scores achieve "Good" rating for 90th percentile users126- Performance optimization delivers 25% improvement in key user experience metrics127- System scalability supports 10x current load without significant degradation128- Performance monitoring prevents 90% of performance-related incidents129130## Verify131132- The test suite was actually executed and exit code/output is captured in the transcript, not just authored133- Pass/fail counts are reported as numbers (e.g., '42 passed, 0 failed'), not 'all tests pass'134- New tests cover at least one negative/edge case in addition to the happy path; the cases are listed135- Coverage delta or affected modules are reported when the project tracks coverage; a baseline number is cited136- For flaky or timing-sensitive tests, the run was repeated at least 3 times and pass-rate is reported137- Any skipped or xfail tests introduced are listed with a reason and an issue/TODO link