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 TypeMethodDescriptionvoidaddProfiledMethod(String id, DynamicMethod method) Add a named method to the profiling service to be monitored.org.jruby.runtime.profile.builtin.BuiltinProfilingService.DefaultMethodEnhancernewMethodEnhancer(Ruby runtime) newProfileCollection(ThreadContext context) org.jruby.runtime.profile.builtin.BuiltinProfilingService.DefaultProfileReporternewProfileReporter(ThreadContext context)
-
Constructor Details
-
BuiltinProfilingService
-
-
Method Details
-
newProfileCollection
- Specified by:
newProfileCollectionin interfaceProfilingService- Parameters:
context- theThreadContextthe new createdProfileCollectionbelongs to.- Returns:
- a new
ProfileCollectioninstance, which will be associated with the given context
-
newMethodEnhancer
public org.jruby.runtime.profile.builtin.BuiltinProfilingService.DefaultMethodEnhancer newMethodEnhancer(Ruby runtime) - Specified by:
newMethodEnhancerin interfaceProfilingService- 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
public org.jruby.runtime.profile.builtin.BuiltinProfilingService.DefaultProfileReporter newProfileReporter(ThreadContext context) - Specified by:
newProfileReporterin interfaceProfilingService- Parameters:
context- theThreadContextthe returnedProfileReporterwill belongs to.- Returns:
- a new instance of
ProfileReporterwhich can be used to process the collected profile information.
-
addProfiledMethod
Description copied from interface:ProfilingServiceAdd a named method to the profiling service to be monitored.- Specified by:
addProfiledMethodin interfaceProfilingService- Parameters:
id- the namemethod- the method
-