directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1749721 - /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/lookup/LookupPerfIT.java
Date Wed, 22 Jun 2016 15:35:40 GMT
Author: elecharny
Date: Wed Jun 22 15:35:40 2016
New Revision: 1749721

URL: http://svn.apache.org/viewvc?rev=1749721&view=rev
Log:
Improved the test accuracy

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

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=1749721&r1=1749720&r2=1749721&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
Wed Jun 22 15:35:40 2016
@@ -61,15 +61,16 @@ public class LookupPerfIT extends Abstra
 
         assertNotNull( entry );
 
-        int nbIterations = 1500000;
+        long nbIterations = 15000000L;
+        long nbWarming =     5000000L;
 
         long t0 = System.currentTimeMillis();
         long t00 = 0L;
         long tt0 = System.currentTimeMillis();
 
-        for ( int i = 0; i < nbIterations; i++ )
+        for ( long i = 0L; i < nbIterations; i++ )
         {
-            if ( i % 100000 == 0 )
+            if ( i % 1000000L == 0L )
             {
                 long tt1 = System.currentTimeMillis();
 
@@ -77,7 +78,7 @@ public class LookupPerfIT extends Abstra
                 tt0 = tt1;
             }
 
-            if ( i == 500000 )
+            if ( i == nbWarming )
             {
                 t00 = System.currentTimeMillis();
             }
@@ -88,7 +89,7 @@ public class LookupPerfIT extends Abstra
         long t1 = System.currentTimeMillis();
 
         Long deltaWarmed = ( t1 - t00 );
-        System.out.println( "Delta all user attrs: " + deltaWarmed + "( " + ( ( ( nbIterations
- 500000 ) * 1000 ) / deltaWarmed )
+        System.out.println( "Delta all user attrs: " + deltaWarmed + "( " + ( ( ( ( nbIterations
- nbWarming ) * 1000L ) / deltaWarmed ) )
             + " per s ) /" + ( t1 - t0 ) );
         connection.close();
     }
@@ -181,15 +182,16 @@ public class LookupPerfIT extends Abstra
     
         assertNotNull( entry );
     
-        int nbIterations = 1500000;
+        long nbIterations = 15000000L;
+        long nbWarming =     5000000L;
     
         long t0 = System.currentTimeMillis();
         long t00 = 0L;
         long tt0 = System.currentTimeMillis();
     
-        for ( int i = 0; i < nbIterations; i++ )
+        for ( long i = 0L; i < nbIterations; i++ )
         {
-            if ( i % 100000 == 0 )
+            if ( i % 1000000L == 0 )
             {
                 long tt1 = System.currentTimeMillis();
     
@@ -197,7 +199,7 @@ public class LookupPerfIT extends Abstra
                 tt0 = tt1;
             }
     
-            if ( i == 500000 )
+            if ( i == nbWarming )
             {
                 t00 = System.currentTimeMillis();
             }
@@ -207,8 +209,8 @@ public class LookupPerfIT extends Abstra
     
         long t1 = System.currentTimeMillis();
     
-        Long deltaWarmed = ( t1 - t00 );
-        System.out.println( "Delta rootDSE all user attrs : " + deltaWarmed + "( " + ( (
( nbIterations - 500000 ) * 1000 ) / deltaWarmed )
+        long deltaWarmed = ( t1 - t00 );
+        System.out.println( "Delta rootDSE all user attrs : " + deltaWarmed + "( " + ( (
( ( nbIterations - nbWarming ) * 1000L ) / deltaWarmed ) )
             + " per s ) /" + ( t1 - t0 ) );
         connection.close();
     }
@@ -227,15 +229,16 @@ public class LookupPerfIT extends Abstra
     
         assertNotNull( entry );
     
-        int nbIterations = 1500000;
+        long nbIterations = 15000000L;
+        long nbWarming =     5000000L;
     
         long t0 = System.currentTimeMillis();
         long t00 = 0L;
         long tt0 = System.currentTimeMillis();
     
-        for ( int i = 0; i < nbIterations; i++ )
+        for ( long i = 0L; i < nbIterations; i++ )
         {
-            if ( i % 100000 == 0 )
+            if ( i % 1000000L == 0 )
             {
                 long tt1 = System.currentTimeMillis();
     
@@ -243,7 +246,7 @@ public class LookupPerfIT extends Abstra
                 tt0 = tt1;
             }
     
-            if ( i == 500000 )
+            if ( i == nbWarming )
             {
                 t00 = System.currentTimeMillis();
             }
@@ -254,7 +257,7 @@ public class LookupPerfIT extends Abstra
         long t1 = System.currentTimeMillis();
     
         Long deltaWarmed = ( t1 - t00 );
-        System.out.println( "Delta rootDSE all attrs : " + deltaWarmed + "( " + ( ( ( nbIterations
- 500000 ) * 1000 ) / deltaWarmed )
+        System.out.println( "Delta rootDSE all attrs : " + deltaWarmed + "( " + ( ( ( ( nbIterations
- nbWarming ) * 1000L ) / deltaWarmed ) )
             + " per s ) /" + ( t1 - t0 ) );
         connection.close();
     }



Mime
View raw message