Package org.jruby.runtime.profile
Interface ProfilingService
- All Known Implementing Classes:
BuiltinProfilingService
public interface ProfilingService
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 TypeMethodDescriptionvoid
addProfiledMethod
(String name, DynamicMethod method) Add a named method to the profiling service to be monitored.newMethodEnhancer
(Ruby runtime) newProfileCollection
(ThreadContext context) newProfileReporter
(ThreadContext context)
-
Method Details
-
newProfileCollection
- Parameters:
context
- theThreadContext
the new createdProfileCollection
belongs to.- Returns:
- a new
ProfileCollection
instance, which will be associated with the given context
-
newMethodEnhancer
- Parameters:
runtime
- The ruby instance the returnedMethodEnhancer
belongs to- Returns:
- a new
MethodEnhancer
instance. will be used to add profiling information to all methods in the given runtime.
-
newProfileReporter
- Parameters:
context
- theThreadContext
the returnedProfileReporter
will belongs to.- Returns:
- a new instance of
ProfileReporter
which can be used to process the collected profile information.
-
addProfiledMethod
Add a named method to the profiling service to be monitored.- Parameters:
name
- the namemethod
- the method
-