directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r421470 - /directory/branches/apacheds/optimization/benchmarks/src/main/java/org/apache/directory/server/benchmarks/BindBenchmark.java
Date Thu, 13 Jul 2006 00:57:58 GMT
Author: akarasulu
Date: Wed Jul 12 17:57:57 2006
New Revision: 421470

URL: http://svn.apache.org/viewvc?rev=421470&view=rev
Log:
doing 10K bind unbind ops and cutting some fat from the test

Modified:
    directory/branches/apacheds/optimization/benchmarks/src/main/java/org/apache/directory/server/benchmarks/BindBenchmark.java

Modified: directory/branches/apacheds/optimization/benchmarks/src/main/java/org/apache/directory/server/benchmarks/BindBenchmark.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/benchmarks/src/main/java/org/apache/directory/server/benchmarks/BindBenchmark.java?rev=421470&r1=421469&r2=421470&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/benchmarks/src/main/java/org/apache/directory/server/benchmarks/BindBenchmark.java
(original)
+++ directory/branches/apacheds/optimization/benchmarks/src/main/java/org/apache/directory/server/benchmarks/BindBenchmark.java
Wed Jul 12 17:57:57 2006
@@ -145,22 +145,22 @@
     public void execute( String[] args ) throws Exception
     {
         long sum = 0;
-        long[] runtimes = new long[1000];
+        long[] runtimes = new long[10000];
         long startTime = System.currentTimeMillis();
         for ( int ii = 0; ii < runtimes.length; ii++ )
         {
-            long time = System.currentTimeMillis();
+//            long time = System.currentTimeMillis();
             bind( 1 );
-            unbind( 2 );
+//            unbind( 2 );
             this.channel.socket().close();
             this.channel.close();
-            runtimes[ii] = ( System.currentTimeMillis() - time );
-            System.out.println( "run #" + ii + ": " + runtimes[ii] );
-            sum += runtimes[ii];
+//            runtimes[ii] = ( System.currentTimeMillis() - time );
+//            System.out.println( "run #" + ii + ": " + runtimes[ii] );
+//            sum += runtimes[ii];
         }
         System.out.println( "Total time (ms) for "+ runtimes.length 
             + " bind unbind operations: " + ( System.currentTimeMillis() - startTime ) );
-        System.out.println( "Average time (ms) for bind unbind operations: " + sum/runtimes.length
);
+//        System.out.println( "Average time (ms) for bind unbind operations: " + sum/runtimes.length
);
     }
     
 
@@ -178,7 +178,7 @@
         authentication = new SimpleAuthentication();
         ( (SimpleAuthentication) authentication ).setSimple( StringTools.getBytesUtf8( "secret"
) );
         bindRequest.setAuthentication( authentication );
-        bindRequest.setName( new LdapDN( "uid=admin,ou=system" ) );
+        bindRequest.setName( new LdapDN( "uID=adMIN,ou=system" ) );
         bindRequest.setVersion( 3 );
         message.setProtocolOP( bindRequest );
         message.setMessageId( messageId );



Mime
View raw message