directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r579321 - /directory/apacheds/trunk/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
Date Tue, 25 Sep 2007 17:17:28 GMT
Author: elecharny
Date: Tue Sep 25 10:17:27 2007
New Revision: 579321

URL: http://svn.apache.org/viewvc?rev=579321&view=rev
Log:
Added some timing information to get the time spent in the test

Modified:
    directory/apacheds/trunk/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java

Modified: directory/apacheds/trunk/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java?rev=579321&r1=579320&r2=579321&view=diff
==============================================================================
--- directory/apacheds/trunk/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
(original)
+++ directory/apacheds/trunk/server-unit/src/main/java/org/apache/directory/server/unit/AbstractServerTest.java
Tue Sep 25 10:17:27 2007
@@ -86,6 +86,9 @@
 
     protected int port = -1;
 
+    private static int start = 0;
+    private static long t0 = 0L;
+    protected static int nbTests = 10000;
     
     /**
      * Tells subclasses whether or not the server is online.
@@ -228,6 +231,13 @@
     protected void setUp() throws Exception
     {
         super.setUp();
+        
+        if ( start == 0 )
+        {
+            t0 = System.currentTimeMillis();
+        }
+
+        start++;
 
         doDelete( configuration.getWorkingDirectory() );
         port = AvailablePortFinder.getNextAvailable( 1024 );
@@ -333,6 +343,11 @@
         sysRoot = null;
         doDelete( configuration.getWorkingDirectory() );
         configuration = new MutableServerStartupConfiguration();
+        
+        if ( start >= nbTests )
+        {
+            System.out.println( "Delta = " + ( System.currentTimeMillis() - t0 ) );
+        }
     }
 
 



Mime
View raw message