Cross Language Profiling with JXInsight – JRuby-to-Ruby
October 14, 2008
Today we have delivered a new early access build of JXInsight 5.7 which includes a JRuby-to-Ruby performance monitoring (profiling) solution making our Probes technology the first cross JVM language resource metering and billing solution – all within the same JVM.
This capability is achievable because in the design of the probes runtime we made the decision to not in anyway tie the instrumentation or measurement to a specific execution construct instead the probes runtime deals with cost centers (hierarchical named groups) which can represent a Java package, class, method, as well as a Ruby module, class, method or operator.
In fact other than a few utility methods in the Probes Open API to convert from a Java class or method to a group (name) the resource metering runtime is unaware of what groups actually represent. You could very easily map the probes to organizational departments and business units even users.
To demonstrate the power of our approach I am going to use the standard hello world implementation in Ruby.
With a Java code profiler (which JXInsight can be configured to act as) and running the Ruby code listed below we get the following call (track) tree output. Not very intuitive and the Ruby code (the execution context) is completely lost amongst the actual JRuby runtime call processing.
Using our new jruby-to-ruby probes extension the same extension results in the following call (track) tree. The contextual probes extension reports the JRuby call execution in terms of Ruby modules, classes, and methods.
It is even possible to combine both the standard profiling extension with the jruby-to-ruby contextual probes extension within the same managed runtime providing a pretty good insight into the JRuby execution engine (VM) in the context of a Ruby application.
It is also worth noting that all our probes providers (strategy, billing, charges, tracking, management, logging, tagging,…) that dynamically enhance the underlying bare-metal probes provider are also available to Ruby applications without change.
To the JXInsight Probes runtime and application management console tooling there is simply no distinction between a Java or Ruby application deployed in a managed runtime. This means Ruby application run by the JRuby VM get straight out-of-the box support for:
- Multi-Resource Metering
- Custom and Cost Meters
- Production-Ready Metering Strategies
- Resource Usage and Cost Tracking, Charging and Billing
- JMX and Logging Integration
- Cluster-Wide Aggregated Monitoring
- Metrics Integration
- Dynamic Tagging
- Offline Analysis (Inspections) and Annotation



