Request Details

Route
/api_complex GET
Timestamp
Sep 22, 2026 3:12 PM
Duration
95.67 ms
Status
500
Response Size
1.8 KB
Error
Yes

Performance Breakdown

Database
8.6% (6 queries)
View Rendering
16.3%
Application Logic
75.1%
Other Operations
0.0%
Total Operations
25
Slowest Operation
95.67 ms

Request Trace

How to read this

Each row is a layer of your stack. Many short Database bars means N+1 queries — fix with includes(). A wide Action bar with little Database time means slow Ruby code. A wide View bar usually means a partial rendered in a loop.

Action
View
Database
Other
Action
View
Database
0.0ms 254.8ms 509.7ms 764.5ms 1019.3ms

Operations

How to use this

Sort by Impact to find your biggest wins. Click any row for details and optimisation suggestions. The same SQL appearing multiple times is an N+1 — fix with includes(). A single operation above 50% impact is your highest priority.

Operation Duration Impact Timeline Actions
SELECT * FROM posts WHERE user_id = ? ORDER BY created_at DESC LIMIT ? 7 ms 7.3%
SELECT * FROM comments WHERE post_id = ? ORDER BY created_at DESC LIMIT ? 2 ms 2.1%
home#api_complex 96 ms 100.0%
home#api_complex 96 ms 100.0%
users/index 19 ms 19.9%
home#api_complex 96 ms 100.0%
posts/show 10 ms 10.5%
home#api_complex 96 ms 100.0%
SELECT * FROM users WHERE id = ? 25 ms 26.1%
posts/show 5 ms 5.2%
SELECT * FROM posts WHERE created_at > ? 28 ms 29.3%
home#api_complex 96 ms 100.0%
home#api_complex 96 ms 100.0%
home/index 27 ms 28.2%
posts/show 25 ms 26.1%
UPDATE posts SET title = ?, content = ?, updated_at = ? WHERE id = ? 7 ms 7.3%
users/index 14 ms 14.6%
layouts/application 28 ms 29.3%
users/index 5 ms 5.2%
home#api_complex 96 ms 100.0%
posts/show 14 ms 14.6%
home#api_complex 96 ms 100.0%
SELECT users.*, posts.*, comments.*, COUNT(DISTINCT posts.id) as post_count, COUNT(DISTINCT comments.id) as comment_count, AVG(posts.view_count) as avg_views, MAX(comments.created_at) as latest_comment FROM users LEFT JOIN posts ON users.id = posts.use... 19 ms 19.9%
users/index 5 ms 5.2%
users/index 14 ms 14.6%