如何分析 JRuby 代码?
我想介绍一下我的 JRuby 应用程序。对于 MRI,我总是使用 ruby-prof,但我认为这不适用于 JRuby。我不想使用 Java 分析器,因为它不会给我 ruby 行号。
有jruby教授吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
JRuby 1.5.5 包含一个不错的 --profile 命令行标志。
像这样使用它:
JRuby 1.5.5 includes a decent --profile command line flag.
Use it like this:
查看 Daniel Lucraft 的新 jruby-prof
Check out Daniel Lucraft's new jruby-prof
http://www.ruby-forum.com/topic/166247#734017
http://www.ruby-forum.com/topic/166247#734017
我们从未收到过对行号的请求,因为它通常只在执行调用堆栈采样时使用,但我会看看我们是否可以将其作为一个选项打开。但在大多数情况下,您不必工作,因为我们的自动热点检测和可扩展计量解决方案可以找到问题,无论是在 ruby 代码还是 jruby 实现中。
archive.org:http://williamlouth.wordpress.com/2009/08/05/the-fastest-ruby-profiler-is-a-java-profiler/
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/