Package ubic.gemma.core.profiling
Class BeanInitializationTimeMonitor
java.lang.Object
ubic.gemma.core.profiling.BeanInitializationTimeMonitor
- All Implemented Interfaces:
org.springframework.beans.factory.config.BeanFactoryPostProcessor
public class BeanInitializationTimeMonitor
extends Object
implements org.springframework.beans.factory.config.BeanFactoryPostProcessor
Hook into the bean post-processing lifecycle and record bean initialization time.
- Author:
- poirigui
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetInitializationTime(String beanName, TimeUnit timeUnit) Obtain the time spent initializing a bean.longgetInstantiationTime(String beanName, TimeUnit timeUnit) Obtain the time spent instantiating a bean.getTotalTime(String beanName, TimeUnit timeUnit) Obtain the total time spent instantiating and initializing a bean.longgetTotalTime(TimeUnit timeUnit) Obtain the total time spent instantiating and initializing beans.voidpostProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) voidreset()Reset recorded times.
-
Constructor Details
-
BeanInitializationTimeMonitor
public BeanInitializationTimeMonitor()
-
-
Method Details
-
getRecordedBeans
-
getInstantiationTime
Obtain the time spent instantiating a bean. -
getInitializationTime
Obtain the time spent initializing a bean. -
getTotalTime
Obtain the total time spent instantiating and initializing a bean. -
getTotalTime
Obtain the total time spent instantiating and initializing beans. -
reset
public void reset()Reset recorded times. -
postProcessBeanFactory
public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) throws org.springframework.beans.BeansException - Specified by:
postProcessBeanFactoryin interfaceorg.springframework.beans.factory.config.BeanFactoryPostProcessor- Throws:
org.springframework.beans.BeansException
-