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 TypeMethodDescriptionvoidaddProfiledMethod(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- theThreadContextthe new createdProfileCollectionbelongs to.- Returns:
- a new
ProfileCollectioninstance, which will be associated with the given context
-
newMethodEnhancer
- Parameters:
runtime- The ruby instance the returnedMethodEnhancerbelongs to- Returns:
- a new
MethodEnhancerinstance. will be used to add profiling information to all methods in the given runtime.
-
newProfileReporter
- Parameters:
context- theThreadContextthe returnedProfileReporterwill belongs to.- Returns:
- a new instance of
ProfileReporterwhich 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
-