How to profile Rails with ruby-prof and JMeter

I would like to profile a Rails application using ruby-prof and JMeter. I am not interested in the proposed profiling methods for a particular control / action / model method; I would like to profile the full stack from top to bottom.

So, I run something like this:

RAILS_ENV=production ruby-prof -f prof.out script/server > /dev/null 

Then I launched the JMeter test plan. However, the problem is that interrupting with CTRL + C or SIGKILL kills ruby-prof before it can write any output. How to stop a mongrel server without interrupting ruby-prof?

+6
source share
2 answers

An alternative to running ruby-prof would be to deploy your application in an intermediate environment (or in some environment that pretty accurately replicates your production environment), monitoring newrelic performance, and then running a large load test from JMeter on it. I find this more accurately reproduces real performance, and you can always add new custom metrics for your application if you need finer performance data than the default than newrelic.

+1
source

Webrick stops at SIGINT and allows prof to dump its data correctly.

kill -INT

0
source

Source: https://habr.com/ru/post/886389/


All Articles