What do you use for live profiling?

After quite a bit of pain in dealing with EventMachine, I started my own
little pet project to write an event system that plays well with others
in a
multithreaded environment.

This has been accomplished, and so I’ve got a really lightweight,
multithreaded, event-based I/O framework that clocks in about 20% faster
than EventMachine on average. The Rack adapter alone performs as well
as
Thin or my optimized Jetty handler, but I haven’t done any optimization
work
yet, and I think a pure Java request parser could easily move the Rack
request performance into the “you have got to be kidding category”

Anyhow, I’d like to do some runtime profiling to see if I can lock down
the
hotspots, but other than ‘–debug -rprofile’, I’m not sure where to
start.
My background is in Ruby, not Java, and I don’t develop using an IDE,
so
it’d be nice if someone could point me to some JRuby-compatible Java
profiling tools that I could leverage.

I’ve given NetBeans a go, but it seems really unhappy connecting to the
system-provided (OS X) JVM, and it would be nice to have just a
stand-alone
profiling tool.

So, any suggestions?

By the way, everything is implemented in pure Ruby, except the I/O
layer,
which uses NIO; I’d happily just use Socket, but it doesn’t appear to be
fully implemented… don’t suppose my NIO stuff could help with that?

Hi Don,

I haven’t used this yet myself, but several people seemed excited about
this profiler:

http://danlucraft.com/blog/2010/03/jruby-prof/

By the way, great line: “you have got to be kidding category” J

Thanks,

Brandon H.

From: Don W. [mailto:[email protected]]
Sent: Tuesday, April 13, 2010 8:36 AM
To: [email protected]
Subject: [jruby-user] What do you use for live profiling?

After quite a bit of pain in dealing with EventMachine, I started my own
little pet project to write an event system that plays well with others
in a multithreaded environment.

This has been accomplished, and so I’ve got a really lightweight,
multithreaded, event-based I/O framework that clocks in about 20% faster
than EventMachine on average. The Rack adapter alone performs as well
as Thin or my optimized Jetty handler, but I haven’t done any
optimization work yet, and I think a pure Java request parser could
easily move the Rack request performance into the “you have got to be
kidding category”

Anyhow, I’d like to do some runtime profiling to see if I can lock down
the hotspots, but other than ‘–debug -rprofile’, I’m not sure where to
start. My background is in Ruby, not Java, and I don’t develop using an
IDE, so it’d be nice if someone could point me to some JRuby-compatible
Java profiling tools that I could leverage.

I’ve given NetBeans a go, but it seems really unhappy connecting to the
system-provided (OS X) JVM, and it would be nice to have just a
stand-alone profiling tool.

So, any suggestions?

By the way, everything is implemented in pure Ruby, except the I/O
layer, which uses NIO; I’d happily just use Socket, but it doesn’t
appear to be fully implemented… don’t suppose my NIO stuff could help
with that?