]> source.dussan.org Git - archiva.git/commitdiff
add timing here
authorOlivier Lamy <olamy@apache.org>
Fri, 18 Jan 2013 15:55:06 +0000 (15:55 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 18 Jan 2013 15:55:06 +0000 (15:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1435205 13f79535-47bb-0310-9956-ffa450edef68

redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/utils/EnvironmentChecker.java

index d8af360b50b3727309b1bada82ba96b680a6c245..29f6655df214559f0d9b04fbf907ccd52e0e12f0 100644 (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() );
     }
 }