Top Description Methods
org.jruby.runtime.profile

public Interface ProfilingService

Known Direct Implementers
org.jruby.runtime.profile.builtin.BuiltinProfilingService
Imports
org.jruby.Ruby, org.jruby.internal.runtime.methods.DynamicMethod, org.jruby.runtime.ThreadContext

A ProfilingService is used to profile jruby programs. Using this interface you can implement your own profiling implementation. You can collect application specified data e.g. group profiling information by user. You can collect jdbc data to, where an how many time a specific query was executed.
Author
Andre Kullmann

Method Summary

Modifier and TypeMethod and Description
public void
addProfiledMethod(String
the name
name
,
DynamicMethod
the method
method
)

Add a named method to the profiling service to be monitored.

public MethodEnhancer

Returns:

a new org.jruby.runtime.profile.MethodEnhancer instance. will be used to add profiling information to all methods in the given runtime.
newMethodEnhancer
(Ruby
The ruby instance the returned org.jruby.runtime.profile.MethodEnhancer belongs to
runtime
)

public ProfileCollection

Returns:

a new org.jruby.runtime.profile.ProfileCollection instance, which will be associated with the given context
newProfileCollection
(ThreadContext context)

public ProfileReporter

Returns:

a new instance of org.jruby.runtime.profile.ProfileReporter which can be used to process the collected profile information.
newProfileReporter
(ThreadContext context)

Method Detail

addProfiledMethodback to summary
public void addProfiledMethod(String name, DynamicMethod method)

Add a named method to the profiling service to be monitored.

Parameters
name:String

the name

method:DynamicMethod

the method

newMethodEnhancerback to summary
public MethodEnhancer newMethodEnhancer(Ruby runtime)
Parameters
runtime:Ruby

The ruby instance the returned org.jruby.runtime.profile.MethodEnhancer belongs to

Returns:MethodEnhancer

a new org.jruby.runtime.profile.MethodEnhancer instance. will be used to add profiling information to all methods in the given runtime.

newProfileCollectionback to summary
public ProfileCollection newProfileCollection(ThreadContext context)
Parameters
context:ThreadContext

the org.jruby.runtime.ThreadContext the new created org.jruby.runtime.profile.ProfileCollection belongs to.

Returns:ProfileCollection

a new org.jruby.runtime.profile.ProfileCollection instance, which will be associated with the given context

newProfileReporterback to summary
public ProfileReporter newProfileReporter(ThreadContext context)
Parameters
context:ThreadContext

the org.jruby.runtime.ThreadContext the returned org.jruby.runtime.profile.ProfileReporter will belongs to.

Returns:ProfileReporter

a new instance of org.jruby.runtime.profile.ProfileReporter which can be used to process the collected profile information.