Class ProfileManager
- java.lang.Object
-
- io.ebeaninternal.server.autotune.service.ProfileManager
-
- All Implemented Interfaces:
NodeUsageListener
,ProfilingListener
public class ProfileManager extends Object implements ProfilingListener
Manages the collection of object graph usage profiling.
-
-
Constructor Summary
Constructors Constructor Description ProfileManager(AutoTuneConfig config, SpiEbeanServer server)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
collectNodeUsage(NodeUsageCollector usageCollector)
Collect usage statistics from a node in the object graph.void
collectQueryInfo(ObjectGraphNode node, long beans, long micros)
Gather query execution statistics.boolean
isProfileRequest(ObjectGraphNode origin, SpiQuery<?> query)
Return true if this request should be profiled (based on the profiling ratio and collection count for this origin).AutoTuneCollection
profilingCollection(boolean reset)
Collect all the profiling information.
-
-
-
Constructor Detail
-
ProfileManager
public ProfileManager(AutoTuneConfig config, SpiEbeanServer server)
-
-
Method Detail
-
isProfileRequest
public boolean isProfileRequest(ObjectGraphNode origin, SpiQuery<?> query)
Description copied from interface:ProfilingListener
Return true if this request should be profiled (based on the profiling ratio and collection count for this origin).- Specified by:
isProfileRequest
in interfaceProfilingListener
-
collectQueryInfo
public void collectQueryInfo(ObjectGraphNode node, long beans, long micros)
Gather query execution statistics. This could either be the originating query in which case the parentNode will be null, or a lazy loading query resulting from traversal of the object graph.- Specified by:
collectQueryInfo
in interfaceProfilingListener
- Parameters:
node
- the node relative to the origin pointbeans
- the number of beans loaded by the querymicros
- the query execution in microseconds
-
collectNodeUsage
public void collectNodeUsage(NodeUsageCollector usageCollector)
Collect usage statistics from a node in the object graph.This is sent to use from a EntityBeanIntercept when the finalise method is called on the bean.
- Specified by:
collectNodeUsage
in interfaceNodeUsageListener
-
profilingCollection
public AutoTuneCollection profilingCollection(boolean reset)
Collect all the profiling information.
-
-