2

is it possible to, say, output the current consumption of CPU and memory in ruby script?

i am trying to find memory leaks in my jruby script.

CPU usage keeps going up to 100% until it crashes.

caitriona
  • 8,569
  • 4
  • 32
  • 36
puqt
  • 183
  • 4
  • 8

2 Answers2

0

the OS gem has an rss_bytes method, but that might not help with jruby.

rogerdpack
  • 62,887
  • 36
  • 269
  • 388
0

Have you considered using ruby-prof?

anshul
  • 5,945
  • 5
  • 24
  • 29
  • http://stackoverflow.com/questions/1445714/how-to-profile-jruby-code doesn't look promising. I have no idea if perftool.rb will do any better on jruby. – anshul Nov 20 '09 at 10:09