wheels analyze performance
This command works correctly without options (parameters). Option support is under development and will be available soon.
Analyzes application performance, identifying bottlenecks and optimization opportunities in your Wheels application.
Usage
wheels analyze performance [--target=<target>] [--duration=<seconds>] [--report] [--threshold=<ms>] [--profile]
Parameters
--target
- (Optional) Analysis target:all
,controller
,view
,query
,memory
. Default:all
--duration
- (Optional) Duration to run analysis in seconds. Default:30
--report
- (Optional) Generate HTML performance report--threshold
- (Optional) Performance threshold in milliseconds. Default:100
--profile
- (Optional) Enable profiling mode
Parameters are coming soon. Currently, this command works without parameters.
Description
The analyze performance
command profiles your Wheels application to identify performance bottlenecks and provide optimization recommendations. It monitors:
Request execution times
Database query performance
Memory usage patterns
Cache effectiveness
View rendering times
Component instantiation overhead
Examples
Basic performance analysis
wheels analyze performance
Analyze for 60 seconds with profiling
wheels analyze performance --duration=60 --profile
Focus on database queries only
wheels analyze performance --target=query
Show only slow operations (>500ms)
wheels analyze performance --threshold=500
Generate HTML performance report
wheels analyze performance --report
Complete analysis with all options
wheels analyze performance --target=all --duration=60 --threshold=200 --profile --report
Output
The analysis provides:
Slowest Requests: Top 10 slowest request paths
Query Analysis: Slow queries and N+1 query detection
Memory Hotspots: Areas of high memory allocation
Cache Statistics: Hit/miss ratios for various caches
Recommendations: Specific optimization suggestions
Sample Output
Starting performance monitoring for 30 seconds...
Target: all
Threshold: 100ms
Performance Analysis Complete!
Summary:
-----------------------------------------
Requests Analyzed: 29
Average Response Time: 290ms
Slowest Request: 491ms
Fastest Request: 51ms
Slow Requests (>100ms): 26
Queries Executed: 29
Average Query Time: 95ms
Slow Queries (>50ms): 23
Average Memory Usage: 193MB
Peak Memory Usage: 193.911277770996MB
Slow Requests:
-----------------------------------------
#list of requests
Slow Queries:
-----------------------------------------
#list of quries
Performance Recommendations:
-----------------------------------------
Consider implementing caching for frequently accessed data
Add indexes to improve query performance
Use query caching for repetitive queries
Enable query result caching in production
Use CDN for static assets
Implement lazy loading for heavy operations
Notes
Profiling adds minimal overhead to your application
Best run in a staging environment with production-like data
Can be integrated with APM tools for continuous monitoring
Results are aggregated across all application instances
Last updated
Was this helpful?