From cf426b9c63322df01413158a24313f010bd73c6e Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Fri, 18 Jan 2013 15:55:06 +0000 Subject: [PATCH] add timing here git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1435205 13f79535-47bb-0310-9956-ffa450edef68 --- .../redback/rest/services/utils/EnvironmentChecker.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/utils/EnvironmentChecker.java b/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/utils/EnvironmentChecker.java index d8af360b5..29f6655df 100644 --- a/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/utils/EnvironmentChecker.java +++ b/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/utils/EnvironmentChecker.java @@ -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 checkers = applicationContext.getBeansOfType( EnvironmentCheck.class ).values(); + StopWatch stopWatch = new StopWatch(); + stopWatch.reset(); + stopWatch.start(); + if ( checkers != null ) { List violations = new ArrayList(); @@ -72,5 +77,8 @@ public class EnvironmentChecker log.error( msg.toString() ); } } + + stopWatch.stop(); + log.info( "time to execute all EnvironmentCheck: {} ms", stopWatch.getTime() ); } } -- 2.39.5