How to profile JRuby code?

ぃ、小莉子 提交于 2019-11-29 02:57:18

问题


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?


回答1:


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

Use it like this:

jruby --profile -S <script> <args>



回答2:


Check out Daniel Lucraft's new jruby-prof




回答3:


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




回答4:


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/



来源:https://stackoverflow.com/questions/1445714/how-to-profile-jruby-code

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!