add timing here
git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1435205 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c95acb2ed6
commit
cf426b9c63
|
@ -19,6 +19,7 @@ package org.apache.archiva.redback.rest.services.utils;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.apache.archiva.redback.system.check.EnvironmentCheck;
|
import org.apache.archiva.redback.system.check.EnvironmentCheck;
|
||||||
|
import org.apache.commons.lang.time.StopWatch;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
|
@ -45,6 +46,10 @@ public class EnvironmentChecker
|
||||||
{
|
{
|
||||||
Collection<EnvironmentCheck> checkers = applicationContext.getBeansOfType( EnvironmentCheck.class ).values();
|
Collection<EnvironmentCheck> checkers = applicationContext.getBeansOfType( EnvironmentCheck.class ).values();
|
||||||
|
|
||||||
|
StopWatch stopWatch = new StopWatch();
|
||||||
|
stopWatch.reset();
|
||||||
|
stopWatch.start();
|
||||||
|
|
||||||
if ( checkers != null )
|
if ( checkers != null )
|
||||||
{
|
{
|
||||||
List<String> violations = new ArrayList<String>();
|
List<String> violations = new ArrayList<String>();
|
||||||
|
@ -72,5 +77,8 @@ public class EnvironmentChecker
|
||||||
log.error( msg.toString() );
|
log.error( msg.toString() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stopWatch.stop();
|
||||||
|
log.info( "time to execute all EnvironmentCheck: {} ms", stopWatch.getTime() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue