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 TypeMethodDescriptionlong
getInitializationTime
(String beanName, TimeUnit timeUnit) Obtain the time spent initializing a bean.long
getInstantiationTime
(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.long
getTotalTime
(TimeUnit timeUnit) Obtain the total time spent instantiating and initializing beans.void
postProcessBeanFactory
(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) void
reset()
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:
postProcessBeanFactory
in interfaceorg.springframework.beans.factory.config.BeanFactoryPostProcessor
- Throws:
org.springframework.beans.BeansException
-