zombocom / derailed_benchmarks

Go faster, off the Rails - Benchmarks for your whole Rails app
2.94k stars 138 forks source link

Unable to get a first run working: HTML output with no apparent sign of performance results #189

Closed gustiando closed 3 years ago

gustiando commented 3 years ago

If I'm understanding right, Rails server needs to be running in terminal session one, and detailed_benchmarks be called in terminal session two as detailed below. I think I'm missing something very obvious.

Anyone has any pointers to offer?

Terminal Session 1

% RAILS_ENV=development rails server
=> Booting Puma                                                                                                                     
=> Rails 5.2.4.5 application starting in development                                                                                
=> Run `rails server -h` for more startup options
Puma starting in single mode...                                                                                                     
* Version 4.3.6 (ruby 2.6.5-p114), codename: Mysterious Traveller                                                                   
* Min threads: 5, max threads: 5                                                                                                    
* Environment: development                                                                                                          
* Listening on tcp://127.0.0.1:3000                                                                                                 
* Listening on tcp://[::1]:3000                                                                                                     
* Use Ctrl-C to stop

Terminal Session 2

% RAILS_ENV=development PATH_TO_HIT=http://127.0.0.1:3000/users/sign_in bundle exec derailed exec perf:stackprof
... large HTML output (example in image below)

97640763-BDA3-43A2-B732-E268B838D88F

schneems commented 3 years ago

If I'm understanding right, Rails server needs to be running in terminal session one, and detailed_benchmarks be called in terminal session two as detailed below

Nope. Derailed boots a server for you. PATH_TO_HIT wasn't designed to be used with a fully qualified path. I have no idea if that would work. It's supposed to be PATH_TO_HIT=/users/sign_in and then let derailed load your app in memory or boot via the background via a server it manages.

Follow the instructions here to debug being able to boot derailed https://github.com/schneems/derailed_benchmarks#running-in-production-locally