Performance Benchmark Specialist
Comprehensive performance benchmarking expertise for shell-based tools, focusing on rigorous measurement, statistical analysis, and actionable performance optimization using patterns from the unix-goto project.
When to Use This Skill
Use this skill when:
- Creating performance benchmarks for shell scripts
- Measuring and validating performance targets
- Implementing statistical analysis for benchmark results
- Designing benchmark workspaces and test environments
- Generating performance reports with min/max/mean/median/stddev
- Comparing baseline vs optimized performance
- Storing benchmark results in CSV format
- Validating performance regressions
- Optimizing shell script performance
Do NOT use this skill for:
- Application profiling (use language-specific profilers)
- Production performance monitoring (use APM tools)
- Load testing web services (use JMeter, k6, etc.)
- Simple timing measurements (use basic
timecommand)
Core Performance Philosophy
Performance-First Development
Performance is NOT an afterthought - it's a core requirement from day one.
unix-goto Performance Principles:
- Define targets BEFORE implementation
- Measure EVERYTHING that matters
- Use statistical analysis, not single runs
- Test at realistic scale
- Validate against targets automatically
Performance Targets from unix-goto
Achieved Results:
- Cached navigation: 26ms (74ms under target)
- Cache build: 3-5s (meets target)
- Cache hit rate: 92-95% (exceeds target)
- Speedup ratio: 8x (work in progress to reach 20x)
Core Knowledge
Standard Benchmark Structure
Every benchmark follows this exact structure:
Benchmark Helper Library
The complete helper library provides ALL benchmarking utilities:
Benchmark Patterns
Pattern 1: Cached vs Uncached Comparison
Purpose: Measure performance improvement from caching
Key Points:
- Clear phase separation (uncached vs cached)
- Proper warmup before measurements
- Statistical analysis of results
- Comparison and speedup calculation
- Target assertions
- Results storage
Pattern 2: Scalability Testing
Purpose: Measure performance at different scales
Key Points:
- Test at multiple scale points
- Adjust targets based on scale
- Workspace generation for each scale
- Proper cleanup between tests
- Results tracking per scale level
Pattern 3: Multi-Level Path Performance
Purpose: Measure performance with complex navigation paths
Key Points:
- Test increasing complexity
- Nested workspace generation
- Measure each level independently
- Compare complexity impact
- Ensure all levels meet targets
Examples
Example 1: Complete Cache Build Benchmark
Example 2: Parallel Navigation Benchmark
Best Practices
Benchmark Design Principles
1. Statistical Validity
- Run at least 10 iterations
- Use proper warmup (3+ runs)
- Calculate full statistics (min/max/mean/median/stddev)
- Report median for central tendency (less affected by outliers)
- Report stddev to show consistency
2. Realistic Testing
- Test at production-like scale
- Use realistic workspaces
- Test common user workflows
- Include edge cases
3. Isolation
- Run on idle system
- Disable unnecessary background processes
- Clear caches between test phases
- Use dedicated test workspaces
4. Reproducibility
- Document all configuration
- Use consistent test data
- Version benchmark code
- Save all results
5. Clarity
- Clear benchmark names
- Descriptive output
- Meaningful comparisons
- Actionable insights
Performance Target Setting
Define targets based on user perception:
unix-goto targets:
- Navigation: <100ms (feels instant)
- Lookups: <10ms (imperceptible)
- Cache build: <5s (acceptable for setup)
Results Analysis
Key metrics to track:
- Mean - Average performance (primary metric)
- Median - Middle value (better for skewed distributions)
- Min - Best case performance
- Max - Worst case performance
- Stddev - Consistency (lower is better)
Red flags:
- High stddev (>20% of mean) - inconsistent performance
- Increasing trend over time - performance regression
- Max >> Mean - outliers, possible issues
CSV Results Format
Standard format:
Benefits:
- Easy to parse and analyze
- Compatible with Excel/Google Sheets
- Can track trends over time
- Enables automated regression detection
Quick Reference
Essential Benchmark Functions
Standard Benchmark Workflow
Performance Targets Quick Reference
Skill Version: 1.0 Last Updated: October 2025 Maintained By: Manu Tej + Claude Code Source: unix-goto benchmark patterns and methodologies


