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.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final classprivate static final class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProfiledMethod(String id, DynamicMethod method) Add a named method to the profiling service to be monitored.newMethodEnhancer(Ruby runtime) newProfileCollection(ThreadContext context) newProfileReporter(ThreadContext context)
-
Field Details
-
profiledMethods
-
-
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
- 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
- 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
-