开发者

how/where to set --profile.api option for jruby running inside jruby-rack/tomcat?

how/where 开发者_如何学Cto set --profile.api option for jruby running inside jruby-rack/tomcat?

This option is documented in how to profile a block of code here


using JRUBY_OPTS won't work due how JRuby profiling is implemented - it only supported profiling a single "main" runtime ... now I was actually trying to make it work with an arbitrary runtime and my code got merged into 1.7 https://github.com/jruby/jruby/pull/96 but it still might require testing and work to be done.

for the record there's also a context paramater for setting arguments (command-line style) when using JRuby-Rack, thus if you had a JRuby version that can profile any runtime you will need to add the following code :

<context-param>
  <param-name>jruby.runtime.arguments</param-name>
  <param-value>--profile.api</param-value>
</context-param>


add to $JRUBY_OPTS

Example:

JRUBY_OPTS="--profile.api"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜