2

Possible Duplicate:
What tools do you recommend to profile Rails apps?

My rails app is taking ~2 seconds to respond to POST requests, and I can't figure out why. When I use traditional profiling tools like newrelic or things that hook into unit tests, they tell me that all of my requests are fast, taking under 20 ms. But when I actually time the requests, they are taking 2 seconds. GET requests are fast. This happens in both development and production mode, using mongrel. So my suspicion is that some gem is doing needless work. How can I track this down? If this was some other sort of server rather than Rails, I would just profile the running server, but the Rails profiling solutions all seem to just profile the controller code.

Community
  • 1
  • 1
lacker
  • 5,470
  • 6
  • 36
  • 38

1 Answers1

1

The well know ruby-prof may help you. The config.ru file of your rails app will give you some hints on running the app manually.

For other alternatives take a look at this question.

Community
  • 1
  • 1
Pablo Castellazzi
  • 4,164
  • 23
  • 20