Request Details

Route
/api_complex GET
Timestamp
Nov 14, 2026 11:06 PM
Duration
166.47 ms
Status
200
Response Size
76 KB
Error
No

Performance Breakdown

Database
6.9% (6 queries)
View Rendering
11.2%
Application Logic
81.9%
Other Operations
0.0%
Total Operations
23
Slowest Operation
166.47 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 406.7ms 813.4ms 1220.1ms 1626.7ms

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
users/index 8 ms 4.8%
posts/show 22 ms 13.2%
home#api_complex 166 ms 100.0%
SELECT name FROM users 23 ms 13.8%
home#api_complex 166 ms 100.0%
SELECT * FROM comments WHERE post_id = ? ORDER BY created_at DESC LIMIT ? 7 ms 4.2%
home#api_complex 166 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... 15 ms 9.0%
layouts/application 40 ms 24.0%
posts/show 38 ms 22.8%
SELECT * FROM users WHERE id = ? 15 ms 9.0%
home/index 35 ms 21.0%
home#api_complex 166 ms 100.0%
home#api_complex 166 ms 100.0%
home#api_complex 166 ms 100.0%
posts/show 7 ms 4.2%
home#api_complex 166 ms 100.0%
posts/show 7 ms 4.2%
SELECT * FROM posts WHERE created_at > ? 32 ms 19.2%
home#api_complex 166 ms 100.0%
UPDATE posts SET view_count = view_count + ? WHERE published = ? 21 ms 12.6%
users/index 17 ms 10.2%
layouts/application 8 ms 4.8%