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:
Olivier Lamy 2013-01-18 15:55:06 +00:00
parent c95acb2ed6
commit cf426b9c63
1 changed files with 8 additions and 0 deletions

View File

@ -19,6 +19,7 @@ package org.apache.archiva.redback.rest.services.utils;
*/
import org.apache.archiva.redback.system.check.EnvironmentCheck;
import org.apache.commons.lang.time.StopWatch;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
@ -45,6 +46,10 @@ public class EnvironmentChecker
{
Collection<EnvironmentCheck> checkers = applicationContext.getBeansOfType( EnvironmentCheck.class ).values();
StopWatch stopWatch = new StopWatch();
stopWatch.reset();
stopWatch.start();
if ( checkers != null )
{
List<String> violations = new ArrayList<String>();
@ -72,5 +77,8 @@ public class EnvironmentChecker
log.error( msg.toString() );
}
}
stopWatch.stop();
log.info( "time to execute all EnvironmentCheck: {} ms", stopWatch.getTime() );
}
}