Package de.hybris.platform.aop
Class ProfilingAspect
java.lang.Object
de.hybris.platform.aop.AbstractProfilingAspect
de.hybris.platform.aop.ProfilingAspect
- All Implemented Interfaces:
Profiler
Default profiling aspect, which uses an injected
ProfilingReportTemplate for
storing the collected data.
Sample Spring configuration: (core-profiling-spring.xml)
<aop:config proxy-target-class="true">
<aop:aspect id="serviceLayerProfilerAspect" ref="defaultProfiler">
<aop:pointcut id="profiledMethods" expression="execution(* de.hybris.platform.servicelayer..*.*(..))" />
<aop:around pointcut-ref="profiledMethods" method="basicProfiling" />
</aop:aspect>
</aop:config>
<bean id="defaultProfiler" class="de.hybris.platform.aop.ProfilingAspect" scope="tenant">
<property name="report" ref="profilingReportBean" />
</bean>
Note:For changing the profiling behaviour, you have to modify the defined 'pointcut' for your needs.-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.aop.AbstractProfilingAspect
AbstractProfilingAspect.Accuracy -
Field Summary
Fields inherited from class de.hybris.platform.aop.AbstractProfilingAspect
accuracy, aspectNodeName, domain, limit, template -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TenantlogExecutionTime(org.aspectj.lang.ProceedingJoinPoint pjp) This methods will be called by the following sample AOP pointcut (core-profilig-spring.xml)voidMethods inherited from class de.hybris.platform.aop.AbstractProfilingAspect
calculateExecutionTime, getAssembler, getOrCreateMBean, getOrCreateResource, getTime, logException, logExecutionTime, setAccuracy, setAspectNodeName, setAssembler, setDomain, setLimit, setTemplate
-
Constructor Details
-
ProfilingAspect
public ProfilingAspect()
-
-
Method Details
-
getOwnTenant
- Specified by:
getOwnTenantin classAbstractProfilingAspect
-
setTenant
-
logExecutionTime
This methods will be called by the following sample AOP pointcut (core-profilig-spring.xml)<aop:pointcut id="profiledMethods" expression="execution(* de.hybris.platform.servicelayer..*.*(..))" /> <aop:around pointcut-ref="profiledMethods" method="logExecutionTime" />
- Parameters:
pjp- pointcut info- Returns:
- execution result
- Throws:
Throwable
-