16

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?

Michiel de Mare
  • 41,982
  • 29
  • 103
  • 134

4 Answers4

8

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

Use it like this:

jruby --profile -S <script> <args>
John
  • 29,546
  • 11
  • 78
  • 79
6

Check out Daniel Lucraft's new jruby-prof

James Moore
  • 8,636
  • 5
  • 71
  • 90
3

http://www.ruby-forum.com/topic/166247#734017

manalang
  • 805
  • 1
  • 6
  • 10
0

We have never received a request for line numbers because that is typically only ever used when performing call stack sampling but I would see whether we can turn this on as an option. But for the most part you will not have to work because our automatic hotspot detection and extensible metering solutions would find the issue whether in the ruby code or the jruby implementation.

archive.org: http://williamlouth.wordpress.com/2009/08/05/the-fastest-ruby-profiler-is-a-java-profiler/

GitaarLAB
  • 14,536
  • 11
  • 60
  • 80
William Louth
  • 207
  • 1
  • 4
  • I think the average developer will be at a complete loss for how to actually afford, obtain, and use this product. It's in a completely different league than ruby-prof. – John Nov 01 '10 at 22:48
  • John the solution is designed for production and to offer the most comprehensive code coverage at the lowest cost due to its dynamic strategy based measurement and collection systems. If it is production and not a hello world style rails app then I think money and perceived complexity due to our novel metering approach are not obstacles. – William Louth Mar 13 '11 at 20:22
  • JXInsight/Opus for JRuby a FREE application performance hotspot analysis tool which maps the Java method execution within the org.jruby.* package to corresponding Ruby operations: http://www.jinspired.com/site/jxinsight-opus-for-jruby-edition-1-0 – William Louth Apr 18 '12 at 05:56
  • The link in the answer is dead. – James Moore May 23 '14 at 23:41