directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r953763 - in /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations: compare/ getRootDse/ hasEntry/ list/ lookup/ search/
Date Fri, 11 Jun 2010 16:43:38 GMT
Author: elecharny
Date: Fri Jun 11 16:43:38 2010
New Revision: 953763

URL: http://svn.apache.org/viewvc?rev=953763&view=rev
Log:
Make all the tests working the same

Modified:
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/compare/ComparePerfIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/getRootDse/GetRootDsePerfIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/hasEntry/hasEntryPerfIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/list/ListPerfTest.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchPerfIT.java

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/compare/ComparePerfIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/compare/ComparePerfIT.java?rev=953763&r1=953762&r2=953763&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/compare/ComparePerfIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/compare/ComparePerfIT.java
Fri Jun 11 16:43:38 2010
@@ -112,7 +112,7 @@ public class ComparePerfIT extends Abstr
         long t1 = System.currentTimeMillis();
 
         Long deltaWarmed = ( t1 - t00 );
-        System.out.println( "Delta copare: " + deltaWarmed + "( " + ( ( ( nbIterations -
50000 ) * 1000 ) / deltaWarmed ) + " per s ) /" + ( t1 - t0 ) );
+        System.out.println( "Delta compare: " + deltaWarmed + "( " + ( ( ( nbIterations -
50000 ) * 1000 ) / deltaWarmed ) + " per s ) /" + ( t1 - t0 ) );
 
         connection.close();
     }

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/getRootDse/GetRootDsePerfIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/getRootDse/GetRootDsePerfIT.java?rev=953763&r1=953762&r2=953763&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/getRootDse/GetRootDsePerfIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/getRootDse/GetRootDsePerfIT.java
Fri Jun 11 16:43:38 2010
@@ -47,21 +47,33 @@ public class GetRootDsePerfIT extends Ab
         Entry rootDSE = service.getOperationManager().getRootDSE( opContext );
 
         assertNotNull( rootDSE );
-        
+        int nbIterations = 150000;
+
         long t0 = System.currentTimeMillis();
+        long t00 = 0L;
+        long tt0 = System.currentTimeMillis();
         
-        for ( int i = 0; i < 100; i++ )
+        for ( int i = 0; i < nbIterations; i++ )
         {
-            for ( int j = 0; j < 5000; j++ )
+            if ( i % 1000 == 0 )
             {
-                rootDSE = service.getOperationManager().getRootDSE( opContext );
+                long tt1 = System.currentTimeMillis();
+
+                System.out.println( i + ", " + ( tt1 - tt0 ) );
+                tt0 = tt1;
             }
-            
-            System.out.print( "." );
+
+            if ( i == 50000 )
+            {
+                t00 = System.currentTimeMillis();
+            }
+
+            rootDSE = service.getOperationManager().getRootDSE( opContext );
         }
         
         long t1 = System.currentTimeMillis();
-        
-        System.out.println( "Delta : " + ( t1 - t0 ) );
+
+        Long deltaWarmed = ( t1 - t00 );
+        System.out.println( "Delta getRootDSE: " + deltaWarmed + "( " + ( ( ( nbIterations
- 50000 ) * 1000 ) / deltaWarmed ) + " per s ) /" + ( t1 - t0 ) );
     }
 }

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/hasEntry/hasEntryPerfIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/hasEntry/hasEntryPerfIT.java?rev=953763&r1=953762&r2=953763&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/hasEntry/hasEntryPerfIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/hasEntry/hasEntryPerfIT.java
Fri Jun 11 16:43:38 2010
@@ -48,21 +48,33 @@ public class hasEntryPerfIT extends Abst
         boolean hasEntry = service.getOperationManager().hasEntry( opContext );
 
         assertTrue( hasEntry );
-        
+        int nbIterations = 150000;
+
         long t0 = System.currentTimeMillis();
+        long t00 = 0L;
+        long tt0 = System.currentTimeMillis();
         
-        for ( int i = 0; i < 100; i++ )
+        for ( int i = 0; i < nbIterations; i++ )
         {
-            for ( int j = 0; j < 5000; j++ )
+            if ( i % 1000 == 0 )
             {
-                hasEntry = service.getOperationManager().hasEntry( opContext );
+                long tt1 = System.currentTimeMillis();
+
+                System.out.println( i + ", " + ( tt1 - tt0 ) );
+                tt0 = tt1;
             }
-            
-            System.out.print( "." );
+
+            if ( i == 50000 )
+            {
+                t00 = System.currentTimeMillis();
+            }
+
+            hasEntry = service.getOperationManager().hasEntry( opContext );
         }
         
         long t1 = System.currentTimeMillis();
-        
-        System.out.println( "Delta : " + ( t1 - t0 ) );
+
+        Long deltaWarmed = ( t1 - t00 );
+        System.out.println( "Delta hasEntry: " + deltaWarmed + "( " + ( ( ( nbIterations
- 50000 ) * 1000 ) / deltaWarmed ) + " per s ) /" + ( t1 - t0 ) );
     }
 }

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/list/ListPerfTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/list/ListPerfTest.java?rev=953763&r1=953762&r2=953763&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/list/ListPerfTest.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/list/ListPerfTest.java
Fri Jun 11 16:43:38 2010
@@ -65,33 +65,46 @@ public class ListPerfTest extends Abstra
         
         assertEquals( 5, nb );
         
+        int nbIterations = 150000;
+
         long t0 = System.currentTimeMillis();
+        long t00 = 0L;
+        long tt0 = System.currentTimeMillis();
         
-        for ( int i = 0; i < 10; i++ )
+        for ( int i = 0; i < nbIterations; i++ )
         {
-            for ( int j = 0; j < 5000; j++ )
+            if ( i % 1000 == 0 )
             {
-                nb = 0;
-                cursor = service.getOperationManager().list( opContext );
+                long tt1 = System.currentTimeMillis();
 
-                while ( cursor.next() )
-                {
-                    Entry entry = cursor.get();
-                    nb++;
-                    
-                    assertNotNull( entry );
-                }
-                
-                cursor.close();
+                System.out.println( i + ", " + ( tt1 - tt0 ) );
+                tt0 = tt1;
+            }
+
+            if ( i == 50000 )
+            {
+                t00 = System.currentTimeMillis();
+            }
+
+            nb = 0;
+            cursor = service.getOperationManager().list( opContext );
+
+            while ( cursor.next() )
+            {
+                Entry entry = cursor.get();
+                nb++;
                 
-                assertEquals( 5, nb );
+                assertNotNull( entry );
             }
             
-            System.out.print( "." );
+            cursor.close();
+            
+            assertEquals( 5, nb );
         }
-        
+            
         long t1 = System.currentTimeMillis();
-        
-        System.out.println( "Delta : " + ( t1 - t0 ) );
+
+        Long deltaWarmed = ( t1 - t00 );
+        System.out.println( "Delta list: " + deltaWarmed + "( " + ( ( ( nbIterations - 50000
) * 1000 ) / deltaWarmed ) + " per s ) /" + ( t1 - t0 ) );
     }
 }

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java?rev=953763&r1=953762&r2=953763&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java
Fri Jun 11 16:43:38 2010
@@ -78,7 +78,7 @@ public class LookupPerfIT extends Abstra
                 tt0 = tt1;
             }
 
-            if ( i == 5000 )
+            if ( i == 50000 )
             {
                 t00 = System.currentTimeMillis();
             }
@@ -89,7 +89,7 @@ public class LookupPerfIT extends Abstra
         long t1 = System.currentTimeMillis();
 
         Long deltaWarmed = ( t1 - t00 );
-        System.out.println( "Delta : " + deltaWarmed + "( " + ( ( ( nbIterations - 5000 )
* 1000 ) / deltaWarmed ) + " per s ) /" + ( t1 - t0 ) );
+        System.out.println( "Delta : " + deltaWarmed + "( " + ( ( ( nbIterations - 50000
) * 1000 ) / deltaWarmed ) + " per s ) /" + ( t1 - t0 ) );
         connection.close();
     }
 }

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchPerfIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchPerfIT.java?rev=953763&r1=953762&r2=953763&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchPerfIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchPerfIT.java
Fri Jun 11 16:43:38 2010
@@ -80,7 +80,7 @@ public class SearchPerfIT extends Abstra
                tt0 = tt1;
            }
 
-           if ( i == 5000 )
+           if ( i == 50000 )
            {
                t00 = System.currentTimeMillis();
            }
@@ -92,7 +92,7 @@ public class SearchPerfIT extends Abstra
        long t1 = System.currentTimeMillis();
 
        Long deltaWarmed = ( t1 - t00 );
-       System.out.println( "Delta : " + deltaWarmed + "( " + ( ( ( nbIterations - 5000 )
* 1000 ) / deltaWarmed ) + " per s ) /" + ( t1 - t0 ) );
+       System.out.println( "Delta : " + deltaWarmed + "( " + ( ( ( nbIterations - 50000 )
* 1000 ) / deltaWarmed ) + " per s ) /" + ( t1 - t0 ) );
        connection.close();
    }
 }



Mime
View raw message