3

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

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

so_mv
  • 3,939
  • 5
  • 29
  • 40

2 Answers2

3

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>
kares
  • 7,076
  • 1
  • 28
  • 38
0

add to $JRUBY_OPTS

Example:

JRUBY_OPTS="--profile.api"
jlbfalcao
  • 111
  • 1
  • 2