Class ProfilingAspect

All Implemented Interfaces:
Profiler

public class ProfilingAspect extends AbstractProfilingAspect
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.
  • Constructor Details

    • ProfilingAspect

      public ProfilingAspect()
  • Method Details

    • getOwnTenant

      protected Tenant getOwnTenant()
      Specified by:
      getOwnTenant in class AbstractProfilingAspect
    • setTenant

      public void setTenant(Tenant tenant)
    • logExecutionTime

      public Object logExecutionTime(org.aspectj.lang.ProceedingJoinPoint pjp) throws Throwable
      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