Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to profile JRuby code?

I'd like to profile my JRuby app. For MRI I always use ruby-prof, but I don't think this works on JRuby. I don't want to use a Java-profiler, because it won't give me the ruby line numbers.

Is there a jruby-prof?

like image 579
Michiel de Mare Avatar asked Sep 18 '09 16:09

Michiel de Mare


1 Answers

JRuby 1.5.5 includes a decent --profile command line flag.

Use it like this:

jruby --profile -S <script> <args>
like image 142
John Avatar answered Jan 02 '23 04:01

John