directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r952729 - /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/move/MovePerfIT.java
Date Tue, 08 Jun 2010 16:40:34 GMT
Author: elecharny
Date: Tue Jun  8 16:40:34 2010
New Revision: 952729

URL: http://svn.apache.org/viewvc?rev=952729&view=rev
Log:
Fixed the Move perf test, it was totally wrong... 

Modified:
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/move/MovePerfIT.java

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/move/MovePerfIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/move/MovePerfIT.java?rev=952729&r1=952728&r2=952729&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/move/MovePerfIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/move/MovePerfIT.java
Tue Jun  8 16:40:34 2010
@@ -72,13 +72,15 @@ public class MovePerfIT extends Abstract
         LdapConnection connection = IntegrationUtils.getAdminConnection( service );
 
         String oldDn = "cn=test,ou=system";
-        String newDn = "cn=test,dc=example,dc=com";
+        String newDn = "cn=test,ou=users,ou=system";
+        String oldSuperior = "ou=system";
+        String newSuperior = "ou=users,ou=system";
 
         DN dn = new DN( oldDn );
         Entry entry = new DefaultEntry( service.getSchemaManager(), dn );
         entry.add( "ObjectClass", "top", "person" );
         entry.add( "sn", "TEST" );
-        entry.add( "cn", "test0" );
+        entry.add( "cn", "test" );
 
         connection.add( entry );
         int nbIterations = 15000;
@@ -105,13 +107,18 @@ public class MovePerfIT extends Abstract
             String newRdn = "cn=test" + i;
             
             long ttt0 = System.nanoTime();
-            connection.move( oldDn, newDn );
+            connection.move( oldDn, newSuperior );
             long ttt1 = System.nanoTime();
 
             // Swap the dn
             String tmpDn = newDn;
             newDn = oldDn;
             oldDn = tmpDn;
+            
+            // Swap the superiors
+            String tmpSuperior = newSuperior;
+            newSuperior = oldSuperior;
+            oldSuperior = tmpSuperior;
             //System.out.println("added " + i + ", delta = " + (ttt1-ttt0)/1000);
         }
 



Mime
View raw message