Package de.hybris.platform.aop
Class ProfilingAspect
- java.lang.Object
-
- de.hybris.platform.aop.AbstractProfilingAspect
-
- de.hybris.platform.aop.ProfilingAspect
-
- All Implemented Interfaces:
Profiler
public class ProfilingAspect extends AbstractProfilingAspect
Default profiling aspect, which uses an injectedProfilingReportTemplatefor 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 Constructor Description ProfilingAspect()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TenantgetOwnTenant()java.lang.ObjectlogExecutionTime(org.aspectj.lang.ProceedingJoinPoint pjp)This methods will be called by the following sample AOP pointcut (core-profilig-spring.xml)voidsetTenant(Tenant tenant)-
Methods inherited from class de.hybris.platform.aop.AbstractProfilingAspect
calculateExecutionTime, getAssembler, getOrCreateMBean, getOrCreateResource, getTime, logException, logExecutionTime, setAccuracy, setAspectNodeName, setAssembler, setDomain, setLimit, setTemplate
-
-
-
-
Method Detail
-
getOwnTenant
protected Tenant getOwnTenant()
- Specified by:
getOwnTenantin classAbstractProfilingAspect
-
setTenant
public void setTenant(Tenant tenant)
-
logExecutionTime
public java.lang.Object logExecutionTime(org.aspectj.lang.ProceedingJoinPoint pjp) throws java.lang.ThrowableThis 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:
java.lang.Throwable
-
-