directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1507695 - /directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddPerfIT.java
Date Sat, 27 Jul 2013 18:01:11 GMT
Author: elecharny
Date: Sat Jul 27 18:01:10 2013
New Revision: 1507695

URL: http://svn.apache.org/r1507695
Log:
Increase the number of addition to have better results

Modified:
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddPerfIT.java

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddPerfIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddPerfIT.java?rev=1507695&r1=1507694&r2=1507695&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddPerfIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddPerfIT.java
Sat Jul 27 18:01:10 2013
@@ -44,31 +44,31 @@ import org.junit.runner.RunWith;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-@RunWith ( FrameworkRunner.class )
+@RunWith(FrameworkRunner.class)
 @CreateLdapServer(transports =
-{ @CreateTransport(protocol = "LDAP") })
+    { @CreateTransport(protocol = "LDAP") })
 @CreateDS(
-        name="AddPerfDS",
-        partitions =
+    name = "AddPerfDS",
+    partitions =
         {
             @CreatePartition(
                 name = "example",
                 suffix = "dc=example,dc=com",
                 contextEntry = @ContextEntry(
                     entryLdif =
-                        "dn: dc=example,dc=com\n" +
+                    "dn: dc=example,dc=com\n" +
                         "dc: example\n" +
                         "objectClass: top\n" +
-                        "objectClass: domain\n\n" ),
+                        "objectClass: domain\n\n"),
                 indexes =
-                {
-                    @CreateIndex( attribute = "objectClass" ),
-                    //@CreateIndex( attribute = "sn" ),
-                    @CreateIndex( attribute = "cn" )
-                } )
-                
-        },
-        enableChangeLog = false )
+                    {
+                        @CreateIndex(attribute = "objectClass"),
+                        //@CreateIndex( attribute = "sn" ),
+                        @CreateIndex(attribute = "cn")
+                })
+
+    },
+    enableChangeLog = false)
 public class AddPerfIT extends AbstractLdapTestUnit
 {
     /**
@@ -81,14 +81,14 @@ public class AddPerfIT extends AbstractL
 
         Dn dn = new Dn( "cn=test,dc=example,dc=com" );
         Entry entry = new DefaultEntry( getService().getSchemaManager(), dn,
-            "ObjectClass: top", 
+            "ObjectClass: top",
             "ObjectClass: person",
             "sn: TEST",
             "cn: test" );
 
         connection.bind( "uid=admin,ou=system", "secret" );
         connection.add( entry );
-        int nbIterations = 1500;
+        int nbIterations = 15000;
 
         long t0 = System.currentTimeMillis();
         long t00 = 0L;
@@ -112,7 +112,7 @@ public class AddPerfIT extends AbstractL
             String name = "test" + i;
             dn = new Dn( "cn=" + name + ",dc=example,dc=com" );
             entry = new DefaultEntry( getService().getSchemaManager(), dn,
-                "ObjectClass: top", 
+                "ObjectClass: top",
                 "ObjectClass: person",
                 "sn", name.toUpperCase(),
                 "cn", name );
@@ -126,24 +126,25 @@ public class AddPerfIT extends AbstractL
         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 - 5000 )
* 1000 ) / deltaWarmed )
+            + " per s ) /" + ( t1 - t0 ) );
+
         int nbFound = 0;
         long t2 = System.currentTimeMillis();
         EntryCursor result = connection.search( "dc=example,dc=com", "(sn=test123*)", SearchScope.SUBTREE,
"*" );
-        
+
         while ( result.next() )
         {
             Entry res = result.get();
-            
+
             System.out.println( res.getDn() );
             nbFound++;
         }
-        
+
         result.close();
         long t3 = System.currentTimeMillis();
-        System.out.println( "Delta search : " + ( t3 - t2 ) + " for " + nbFound + " entries");
-        
+        System.out.println( "Delta search : " + ( t3 - t2 ) + " for " + nbFound + " entries"
);
+
         connection.close();
     }
 }



Mime
View raw message