Author: olamy
Date: Fri Jan 18 15:55:06 2013
New Revision: 1435205
URL: http://svn.apache.org/viewvc?rev=1435205&view=rev
Log:
add timing here
Modified:
archiva/redback/redback-core/trunk/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/utils/EnvironmentChecker.java
Modified:
archiva/redback/redback-core/trunk/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/utils/EnvironmentChecker.java
URL:
http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/utils/EnvironmentChecker.java?rev=1435205&r1=1435204&r2=1435205&view=diff
==============================================================================
---
archiva/redback/redback-core/trunk/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/utils/EnvironmentChecker.java
(original)
+++
archiva/redback/redback-core/trunk/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/utils/EnvironmentChecker.java
Fri Jan 18 15:55:06 2013
@@ -19,6 +19,7 @@ package org.apache.archiva.redback.rest.
*/
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() );
}
}