directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r952357 - in /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations: add/AddPerfIT.java rename/RenamePerfIT.java
Date Mon, 07 Jun 2010 18:15:34 GMT
Author: elecharny
Date: Mon Jun  7 18:15:33 2010
New Revision: 952357

URL: http://svn.apache.org/viewvc?rev=952357&view=rev
Log:
Added some more decent traces

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

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/add/AddPerfIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/add/AddPerfIT.java?rev=952357&r1=952356&r2=952357&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/add/AddPerfIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/add/AddPerfIT.java
Mon Jun  7 18:15:33 2010
@@ -69,7 +69,6 @@ public class AddPerfIT extends AbstractL
      * Test an add operation performance
      */
     @Test
-    //@Ignore
     public void testAddPerf() throws Exception
     {
         LdapConnection connection = IntegrationUtils.getAdminConnection( service );
@@ -81,11 +80,13 @@ public class AddPerfIT extends AbstractL
         entry.add( "cn", "test" );
 
         connection.add( entry );
+        int nbIterations = 15000;
 
         long t0 = System.currentTimeMillis();
+        long t00 = 0L;
         long tt0 = System.currentTimeMillis();
 
-        for ( int i = 0; i < 10000; i++ )
+        for ( int i = 0; i < nbIterations; i++ )
         {
             if ( i % 100 == 0 )
             {
@@ -95,6 +96,11 @@ public class AddPerfIT extends AbstractL
                 tt0 = tt1;
             }
 
+            if ( i == 5000 )
+            {
+                t00 = System.currentTimeMillis();
+            }
+
             String name = "test" + i;
             dn = new DN( "cn=" + name + ",ou=system" );
             entry = new DefaultEntry( service.getSchemaManager(), dn );
@@ -110,7 +116,8 @@ public class AddPerfIT extends AbstractL
 
         long t1 = System.currentTimeMillis();
 
-        System.out.println( "Delta : " + ( t1 - t0 ) );
+        Long deltaWarmed = ( t1 - t00 );
+        System.out.println( "Delta : " + deltaWarmed + "( " + ( ( ( nbIterations - 5000 )
* 1000 ) / deltaWarmed ) + " per s ) /" + ( t1 - t0 ) );
         connection.close();
     }
 }

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/rename/RenamePerfIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/rename/RenamePerfIT.java?rev=952357&r1=952356&r2=952357&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/rename/RenamePerfIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/rename/RenamePerfIT.java
Mon Jun  7 18:15:33 2010
@@ -80,11 +80,11 @@ public class RenamePerfIT extends Abstra
         entry.add( "cn", "test0" );
 
         connection.add( entry );
+        int nbIterations = 15000;
 
         long t0 = System.currentTimeMillis();
         long t00 = 0L;
         long tt0 = System.currentTimeMillis();
-        int nbIterations = 15000;
         
         for ( int i = 0; i < nbIterations; i++ )
         {



Mime
View raw message