Class BuiltinProfilingService
java.lang.Object
org.jruby.runtime.profile.builtin.BuiltinProfilingService
- All Implemented Interfaces:
ProfilingService
This implementation of
ProfilingService
will be used for all profiling methods
which are shipped with jruby.- Author:
- Andre Kullmann
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProfiledMethod
(String id, DynamicMethod method) Add a named method to the profiling service to be monitored.org.jruby.runtime.profile.builtin.BuiltinProfilingService.DefaultMethodEnhancer
newMethodEnhancer
(Ruby runtime) newProfileCollection
(ThreadContext context) org.jruby.runtime.profile.builtin.BuiltinProfilingService.DefaultProfileReporter
newProfileReporter
(ThreadContext context)
-
Constructor Details
-
BuiltinProfilingService
-
-
Method Details
-
newProfileCollection
- Specified by:
newProfileCollection
in interfaceProfilingService
- Parameters:
context
- theThreadContext
the new createdProfileCollection
belongs to.- Returns:
- a new
ProfileCollection
instance, which will be associated with the given context
-
newMethodEnhancer
public org.jruby.runtime.profile.builtin.BuiltinProfilingService.DefaultMethodEnhancer newMethodEnhancer(Ruby runtime) - Specified by:
newMethodEnhancer
in interfaceProfilingService
- 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
public org.jruby.runtime.profile.builtin.BuiltinProfilingService.DefaultProfileReporter newProfileReporter(ThreadContext context) - Specified by:
newProfileReporter
in interfaceProfilingService
- 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
Description copied from interface:ProfilingService
Add a named method to the profiling service to be monitored.- Specified by:
addProfiledMethod
in interfaceProfilingService
- Parameters:
id
- the namemethod
- the method
-