CLI Overview
Quick Start Guide
wheels info
wheels reload
wheels deps
wheels destroy
wheels watch
wheels generate app
wheels generate app-wizard
wheels generate controller
wheels generate model
wheels generate view
wheels generate property
wheels generate route
wheels generate resource
wheels generate api-resource
wheels generate frontend
wheels generate test
wheels generate snippets
wheels scaffold
wheels db create
wheels db drop
wheels db setup
wheels db reset
wheels db status
wheels db version
wheels db rollback
wheels db seed
wheels db dump
wheels db restore
wheels db shell
wheels db schema
wheels dbmigrate info
wheels dbmigrate latest
wheels dbmigrate up
wheels dbmigrate down
wheels dbmigrate reset
wheels dbmigrate exec
wheels dbmigrate create blank
wheels dbmigrate create table
wheels dbmigrate create column
wheels dbmigrate remove table
wheels test
wheels test run
wheels test coverage
wheels test debug
wheels config list
wheels config set
wheels config env
wheels env
wheels env setup
wheels env list
wheels env switch
wheels environment
wheels console
wheels runner
wheels server
wheels server start
wheels server stop
wheels server restart
wheels server status
wheels server log
wheels server open
wheels plugins
wheels plugins list
wheels plugins install
wheels plugins remove
wheels analyze
wheels analyze code
wheels analyze performance
wheels analyze security
wheels security
wheels security scan
wheels optimize
wheels optimize performance
wheels docs
wheels docs generate
wheels docs serve
wheels ci init
wheels docker init
wheels docker deploy
wheels deploy
wheels deploy audit
wheels deploy exec
wheels deploy hooks
wheels deploy init
wheels deploy lock
wheels deploy logs
wheels deploy proxy
wheels deploy push
wheels deploy rollback
wheels deploy secrets
wheels deploy setup
wheels deploy status
wheels deploy stop
Configuration Management
Creating Commands
Service Architecture
Migrations Guide
Testing Guide
Object Relational Mapping
Creating Records
Reading Records
Updating Records
Deleting Records
Column Statistics
Dynamic Finders
Getting Paginated Data
Associations
Nested Properties
Object Validation
Object Callbacks
Calculated Properties
Transactions
Dirty Records
Soft Delete
Automatic Time Stamps
Using Multiple Data Sources
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