directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r413909 - in /directory/branches/apacheds/optimization: core-unit/ core-unit/src/main/java/org/apache/directory/server/core/unit/ core-unit/src/test/java/org/apache/directory/server/core/ core-unit/src/test/resources/org/apache/directory/se...
Date Tue, 13 Jun 2006 14:37:05 GMT
Author: akarasulu
Date: Tue Jun 13 07:37:04 2006
New Revision: 413909

URL: http://svn.apache.org/viewvc?rev=413909&view=rev
Log:
reducing cache default size and adding simple performance testing profile and framework junit
base classes

Added:
    directory/branches/apacheds/optimization/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java
    directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/TestPTest.java
    directory/branches/apacheds/optimization/core-unit/src/test/resources/org/apache/directory/server/core/org.apache.directory.server.core.TestPTest.ldif
Modified:
    directory/branches/apacheds/optimization/core-unit/pom.xml
    directory/branches/apacheds/optimization/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java
    directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java

Modified: directory/branches/apacheds/optimization/core-unit/pom.xml
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core-unit/pom.xml?rev=413909&r1=413908&r2=413909&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core-unit/pom.xml (original)
+++ directory/branches/apacheds/optimization/core-unit/pom.xml Tue Jun 13 07:37:04 2006
@@ -39,7 +39,7 @@
 
   <profiles>
     <profile>
-    <id>no-integration-tests</id>
+    <id>no-integration-or-perf-tests</id>
     <activation>
       <activeByDefault>true</activeByDefault>
     </activation>
@@ -50,6 +50,7 @@
           <configuration>
             <excludes>
               <exclude>**/*ITest.java</exclude>
+              <exclude>**/*PTest.java</exclude>
             </excludes>
           </configuration>
         </plugin>
@@ -65,8 +66,9 @@
                           W A R N I N G
                           -------------
                   
-Integration tests have been disabled.  To enable integration
-tests run maven with the -Dinstegration.
+Integration and performance tests have been disabled.  To enable 
+integration tests run maven with the -Dintegration switch.  To 
+enable performance tests run maven with the -Dperformance switch.
 =================================================================
                     </echo>
                   </tasks>
@@ -77,7 +79,7 @@
               </execution>
             </executions>
           </plugin>
-   	</plugins>
+   	    </plugins>
       </build>
     </profile>
     <profile>
@@ -85,6 +87,90 @@
       <activation>
         <property><name>integration</name></property>
       </activation>
+    <build>
+      <plugins>
+        <plugin>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <configuration>
+            <excludes>
+              <exclude>**/*PTest.java</exclude>
+            </excludes>
+          </configuration>
+        </plugin>
+        <plugin>
+          <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                <phase>validate</phase>
+                <configuration>
+                  <tasks>
+                    <echo>
+=================================================================
+                   I N T E G R A T I O N
+                   ---------------------
+                  
+Performance tests have been disabled.  To enable 
+performance tests run maven with the -Dperformance switch.
+=================================================================
+                    </echo>
+                  </tasks>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+   	    </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>performance</id>
+      <activation>
+        <property><name>performance</name></property>
+      </activation>
+    <build>
+      <plugins>
+        <plugin>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <configuration>
+            <systemProperties>
+              <property>
+                <name>outputDirectory</name>
+                <value>${basedir}/target</value>
+              </property>
+            </systemProperties>
+            <excludes>
+              <exclude>**/*ITest.java</exclude>
+            </excludes>
+          </configuration>
+        </plugin>
+        <plugin>
+          <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                <phase>validate</phase>
+                <configuration>
+                  <tasks>
+                    <echo>
+=================================================================
+                   P E R F O R M A N C E
+                   ---------------------
+                  
+Integration tests have been disabled.  To enable integration
+tests run maven with the -Dintegration switch.
+=================================================================
+                    </echo>
+                  </tasks>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+   	    </plugins>
+      </build>
     </profile>
   </profiles>
 </project>

Added: directory/branches/apacheds/optimization/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java?rev=413909&view=auto
==============================================================================
--- directory/branches/apacheds/optimization/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java
(added)
+++ directory/branches/apacheds/optimization/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractPerformanceTest.java
Tue Jun 13 07:37:04 2006
@@ -0,0 +1,287 @@
+/*
+ *   @(#) $Id$
+ *
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.directory.server.core.unit;
+
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Iterator;
+
+import javax.naming.Context;
+import javax.naming.directory.BasicAttributes;
+import javax.naming.ldap.InitialLdapContext;
+import javax.naming.ldap.LdapContext;
+
+import org.apache.directory.server.core.configuration.MutableDirectoryPartitionConfiguration;
+import org.apache.directory.server.core.partition.DirectoryPartitionNexus;
+import org.apache.directory.shared.ldap.ldif.Entry;
+import org.apache.directory.shared.ldap.ldif.LdifReader;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.util.NamespaceTools;
+
+
+/**
+ * A base testcase is used to create test harnesses for running performance 
+ * metrics on ApacheDS and other servers.  It provides a framework for running 
+ * tests and capturing the results of individual operations against the 
+ * directory.
+ * <br>
+ * This test case does a few things out of the box to make life easier for those
+ * that want to run performance tests against an LDAP server.  These are listed
+ * below:
+ * <ul>
+ *   <li>
+ *      Uses the presence of a system property, 'external', to bypass the
+ *      creation of an embedded ApacheDS instance.  If the external property
+ *      is defined, a properties file by the name of the test case with the 
+ *      .properties extension is searched for on the classpath.  If found this
+ *      properties file is loaded and those parameters are used to connect to
+ *      the LDAP server by feeding those properties into the InitialContext's
+ *      environment argument.  If the properties file is not found, smart 
+ *      defaults are used instead to connect to some external LDAP server.
+ *      
+ *      Uses an external.prepare.command system property to execute a command 
+ *      between test cases.  Execution occurs before any test is run.  This 
+ *      command should stop a server if it is running, clean out the database
+ *      contents, and restart the server readying it for another run.
+ *   </li>
+ *
+ *   <li>
+ *      Automatically searches for an LDIF file with the same name as the current
+ *      test case.  This file is loaded for each test case after loading a 
+ *      common.ldif file if it is present on the classpath.  The test case can be 
+ *      told to disable this LDIF file loading for both the common.ldif and the 
+ *      <className>.ldif file.
+ *   </li>
+ *
+ *   <li>
+ *      The performance test reports statistics to the console.  Each operation 
+ *      being perform is logged with timing information.  The time for each LDIF
+ *      operation is also tracked.  The statistics are also compiled into a 
+ *      output formated file.
+ *   </li>
+ *
+ *   <li>
+ *      After LDIF loads, test cases run.  These test cases can issue various 
+ *      additional operations which get logged.
+ *   </li>
+ *
+ * </ul>
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class AbstractPerformanceTest extends AbstractTestCase
+{
+    private final Class subclass;
+    private boolean isExternal = false;
+    private String prepareCommand = null;
+    private File outputDirectory = null;
+    private PrintWriter statsOut = null;
+    private long startTime = 0;
+    private LdapContext testRoot;
+    
+    
+    /**
+     * Initializes the statistics log PrintWriter.
+     * 
+     * @param subclass 
+     */
+    protected AbstractPerformanceTest( Class subclass ) throws IOException
+    {
+        super( DirectoryPartitionNexus.ADMIN_PRINCIPAL, "secret" );
+        this.subclass = subclass;
+        
+        // Setup the statistics output writer
+        outputDirectory = new File( System.getProperty( "outputDirectory", "." ) );
+        File statsOutFile = new File( outputDirectory, subclass.getName() + ".stats" );
+        statsOut = new PrintWriter( new FileWriter( statsOutFile ) );
+        
+        // Setup variables for handling external LDAP servers
+        isExternal = System.getProperties().containsKey( "external" );
+        if ( isExternal )
+        {
+            prepareCommand = System.getProperty( "external.prepare.command", null );
+        }
+    }
+    
+    
+    protected void setUp() throws Exception
+    {
+        if ( ! isExternal )
+        {
+            // Add indices for ou, uid, and objectClass
+            HashSet indexedAttributes = new HashSet();
+            indexedAttributes.add( "ou" );
+            indexedAttributes.add( "uid" );
+            indexedAttributes.add( "objectClass" );
+            
+            // Build the root entry for the new partition
+            BasicAttributes attributes = new BasicAttributes( "objectClass", "top", true
);
+            attributes.get( "objectClass" ).add( "organizationalUnit" );
+            attributes.put( "ou", "test" );
+            
+            // Add apache.org paritition since all work will be done here
+            MutableDirectoryPartitionConfiguration partConfig = new MutableDirectoryPartitionConfiguration();
+            partConfig.setIndexedAttributes( indexedAttributes );
+            partConfig.setName( "test" );
+            partConfig.setSuffix( "ou=test" );
+            partConfig.setContextEntry( attributes );
+            
+            configuration.setShutdownHookEnabled( false );
+            configuration.setContextPartitionConfigurations( Collections.singleton( partConfig
) );
+            
+            doDelete( configuration.getWorkingDirectory() );
+            setSysRoot( username, password, configuration );
+            
+            Hashtable env = new Hashtable( configuration.toJndiEnvironment() );
+            env.put( Context.SECURITY_PRINCIPAL, username );
+            env.put( Context.SECURITY_CREDENTIALS, password );
+            env.put( Context.SECURITY_AUTHENTICATION, "simple" );
+            env.put( Context.PROVIDER_URL, "ou=test" );
+            env.put( Context.INITIAL_CONTEXT_FACTORY, 
+                "org.apache.directory.server.core.jndi.CoreContextFactory" );
+            testRoot = new InitialLdapContext( env, null );
+        }
+        else
+        {
+            // execute the external prepare command
+            execute( prepareCommand );
+            
+            // load the JNDI properties if it exists otherwise use smart defaults
+        }
+        
+        startTime = System.currentTimeMillis();
+        statsOut.println( "========================================================================="
);
+        statsOut.println( "[START]: " + subclass.getName() );
+        statsOut.println( "========================================================================="
);
+        statsOut.flush();
+        loadLdifs();
+    }
+    
+    
+    protected void tearDown() throws Exception
+    {
+        statsOut.println( "========================================================================="
);
+        statsOut.println( "[FINISH]: " + subclass.getName() );
+        statsOut.println( "========================================================================="
);
+        statsOut.flush();
+        super.tearDown();
+    }
+    
+    
+    /**
+     * Loads the commons.ldif file if present, then it loads the test 
+     * specific LDIF file also if present.  
+     */
+    private void loadLdifs() throws Exception
+    {
+        InputStream in = subclass.getResourceAsStream( "/common.ldif" );
+        if ( in != null )
+        {
+            in.close();
+            loadLdif( "/common.ldif" );
+        }
+
+        String testLdif = subclass.getName() + ".ldif";
+        in = subclass.getResourceAsStream( testLdif );
+        if ( in != null )
+        {
+            in.close();
+            loadLdif( testLdif );
+        }
+    }
+    
+    
+    /**
+     * Only supports add operations at this point.
+     * 
+     * @param entry the LDIF entry being applied
+     */
+    protected boolean applyEntry( Entry entry ) throws Exception
+    {
+        switch ( entry.getChangeType() )
+        {
+            case( Entry.ADD ):
+                LdapDN ancestor = new LdapDN( testRoot.getNameInNamespace() );
+                LdapDN descendant = new LdapDN( entry.getDn() );
+                LdapDN relative = ( LdapDN ) NamespaceTools.getRelativeName( ancestor, descendant
);
+                testRoot.createSubcontext( relative, entry.getAttributes() );
+                return true;
+            default:
+                return false;
+        }
+    }
+    
+    
+    private void loadLdif( String ldifResource ) throws Exception
+    {
+        int count = 0;
+        long start = 0;
+        
+        InputStream in = subclass.getResourceAsStream( ldifResource );
+        if ( in != null )
+        {
+            LdifReader reader = new LdifReader( in );
+            start = System.currentTimeMillis();
+            log( "Started LDIF Import: " + ldifResource  );
+            for ( Iterator ii = reader.iterator(); ii.hasNext(); /**/ )
+            {
+                long startEntry = System.currentTimeMillis();
+                if ( applyEntry( ( Entry ) ii.next() ) )
+                {
+                    count++;
+                }
+                log( "added " + count + "-th entry in " + ( System.currentTimeMillis() -
startEntry ) );
+                statsOut.flush();
+            }
+        }
+        
+        StringBuffer buf = new StringBuffer();
+        buf.append( "Completed LDIF Import: " );
+        buf.append( count ).append( " entries in " );
+        buf.append( System.currentTimeMillis() - start );
+        buf.append( " milliseconds" );
+        log( buf.toString() );
+        statsOut.flush();
+    }
+    
+    
+    private void execute( String prepareCommand )
+    {
+
+    }
+
+    
+    private void log( String msg )
+    {
+        StringBuffer buf = new StringBuffer();
+        buf.append( "[" ).append( System.currentTimeMillis() - startTime ).append( "] - "
);
+        buf.append( msg );
+        statsOut.println( buf );
+    }
+}
+
+

Modified: directory/branches/apacheds/optimization/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java?rev=413909&r1=413908&r2=413909&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java
(original)
+++ directory/branches/apacheds/optimization/core-unit/src/main/java/org/apache/directory/server/core/unit/AbstractTestCase.java
Tue Jun 13 07:37:04 2006
@@ -70,9 +70,9 @@
         "roomnumber: 4612\n" +
         "userpassword: test\n";
 
-    private final String username;
+    protected final String username;
 
-    private final String password;
+    protected final String password;
 
     /** the context root for the system partition */
     protected LdapContext sysRoot;

Added: directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/TestPTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/TestPTest.java?rev=413909&view=auto
==============================================================================
--- directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/TestPTest.java
(added)
+++ directory/branches/apacheds/optimization/core-unit/src/test/java/org/apache/directory/server/core/TestPTest.java
Tue Jun 13 07:37:04 2006
@@ -0,0 +1,44 @@
+/*
+ *   @(#) $Id$
+ *
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.directory.server.core;
+
+
+import java.io.IOException;
+
+import org.apache.directory.server.core.unit.AbstractPerformanceTest;
+
+
+/**
+ * Tests that the AbstractPerformanceTest works.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class TestPTest extends AbstractPerformanceTest
+{
+    public TestPTest() throws IOException
+    {
+        super( TestPTest.class );
+    }
+
+    
+    public void testEmbedded()
+    {
+    }
+}

Added: directory/branches/apacheds/optimization/core-unit/src/test/resources/org/apache/directory/server/core/org.apache.directory.server.core.TestPTest.ldif
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core-unit/src/test/resources/org/apache/directory/server/core/org.apache.directory.server.core.TestPTest.ldif?rev=413909&view=auto
==============================================================================
--- directory/branches/apacheds/optimization/core-unit/src/test/resources/org/apache/directory/server/core/org.apache.directory.server.core.TestPTest.ldif
(added)
+++ directory/branches/apacheds/optimization/core-unit/src/test/resources/org/apache/directory/server/core/org.apache.directory.server.core.TestPTest.ldif
Tue Jun 13 07:37:04 2006
@@ -0,0 +1,240 @@
+dn: uid=user.1,ou=test
+objectClass: top
+objectClass: person
+objectClass: organizationalPerson
+objectClass: inetOrgPerson
+givenName: Aaccf
+sn: Amar
+cn: Aaccf Amar
+initials: AA
+uid: user.1
+mail: user.1@cs.hacettepe.edu.tr
+userPassword: password
+telephoneNumber: 994-525-9391
+homePhone: 378-788-8976
+pager: 814-796-5035
+mobile: 664-717-7707
+employeeNumber: 1
+street: 58687 Pine Street
+l: Bismarck
+st: MI
+postalCode: 06589
+postalAddress: Aaccf Amar$58687 Pine Street$Bismarck, MI  06589
+description: This is the description for Aaccf Amar.
+
+dn: uid=user.2,ou=test
+objectClass: top
+objectClass: person
+objectClass: organizationalPerson
+objectClass: inetOrgPerson
+givenName: Aaren
+sn: Atp
+cn: Aaren Atp
+initials: AA
+uid: user.2
+mail: user.2@cs.hacettepe.edu.tr
+userPassword: password
+telephoneNumber: 061-320-5759
+homePhone: 834-132-3638
+pager: 712-795-7961
+mobile: 796-283-8624
+employeeNumber: 2
+street: 34093 South Street
+l: Greenville
+st: AL
+postalCode: 39169
+postalAddress: Aaren Atp$34093 South Street$Greenville, AL  39169
+description: This is the description for Aaren Atp.
+
+dn: uid=user.3,ou=test
+objectClass: top
+objectClass: person
+objectClass: organizationalPerson
+objectClass: inetOrgPerson
+givenName: Aarika
+sn: Atpco
+cn: Aarika Atpco
+initials: AA
+uid: user.3
+mail: user.3@cs.hacettepe.edu.tr
+userPassword: password
+telephoneNumber: 056-289-0397
+homePhone: 148-375-6716
+pager: 187-907-2940
+mobile: 525-064-0840
+employeeNumber: 3
+street: 16991 Maple Street
+l: Greenville
+st: OK
+postalCode: 32185
+postalAddress: Aarika Atpco$16991 Maple Street$Greenville, OK  32185
+description: This is the description for Aarika Atpco.
+
+dn: uid=user.4,ou=test
+objectClass: top
+objectClass: person
+objectClass: organizationalPerson
+objectClass: inetOrgPerson
+givenName: Aaron
+sn: Atrc
+cn: Aaron Atrc
+initials: AA
+uid: user.4
+mail: user.4@cs.hacettepe.edu.tr
+userPassword: password
+telephoneNumber: 938-736-3599
+homePhone: 883-112-9754
+pager: 720-958-3042
+mobile: 109-808-8843
+employeeNumber: 4
+street: 77869 Second Street
+l: Phoenix
+st: IN
+postalCode: 97430
+postalAddress: Aaron Atrc$77869 Second Street$Phoenix, IN  97430
+description: This is the description for Aaron Atrc.
+
+dn: uid=user.5,ou=test
+objectClass: top
+objectClass: person
+objectClass: organizationalPerson
+objectClass: inetOrgPerson
+givenName: Aartjan
+sn: Aalders
+cn: Aartjan Aalders
+initials: AA
+uid: user.5
+mail: user.5@cs.hacettepe.edu.tr
+userPassword: password
+telephoneNumber: 812-987-3725
+homePhone: 853-893-9481
+pager: 291-196-6428
+mobile: 314-584-2269
+employeeNumber: 5
+street: 71911 Spruce Street
+l: Jacksonville
+st: MD
+postalCode: 73693
+postalAddress: Aartjan Aalders$71911 Spruce Street$Jacksonville, MD  73693
+description: This is the description for Aartjan Aalders.
+
+dn: uid=user.6,ou=test
+objectClass: top
+objectClass: person
+objectClass: organizationalPerson
+objectClass: inetOrgPerson
+givenName: Abagael
+sn: Aasen
+cn: Abagael Aasen
+initials: AA
+uid: user.6
+mail: user.6@cs.hacettepe.edu.tr
+userPassword: password
+telephoneNumber: 836-394-9544
+homePhone: 734-998-7219
+pager: 640-912-1798
+mobile: 309-488-1528
+employeeNumber: 6
+street: 06511 Walnut Street
+l: Wheeling
+st: TX
+postalCode: 83735
+postalAddress: Abagael Aasen$06511 Walnut Street$Wheeling, TX  83735
+description: This is the description for Abagael Aasen.
+
+dn: uid=user.7,ou=test
+objectClass: top
+objectClass: person
+objectClass: organizationalPerson
+objectClass: inetOrgPerson
+givenName: Abagail
+sn: Abadines
+cn: Abagail Abadines
+initials: AA
+uid: user.7
+mail: user.7@cs.hacettepe.edu.tr
+userPassword: password
+telephoneNumber: 098-281-1499
+homePhone: 336-115-9566
+pager: 998-252-7023
+mobile: 290-662-6595
+employeeNumber: 7
+street: 05112 Johnson Street
+l: Fort Myers
+st: AR
+postalCode: 54999
+postalAddress: Abagail Abadines$05112 Johnson Street$Fort Myers, AR  54999
+description: This is the description for Abagail Abadines.
+
+dn: uid=user.8,ou=test
+objectClass: top
+objectClass: person
+objectClass: organizationalPerson
+objectClass: inetOrgPerson
+givenName: Abahri
+sn: Abazari
+cn: Abahri Abazari
+initials: AA
+uid: user.8
+mail: user.8@cs.hacettepe.edu.tr
+userPassword: password
+telephoneNumber: 735-552-9982
+homePhone: 738-166-9638
+pager: 953-573-3912
+mobile: 408-042-7320
+employeeNumber: 8
+street: 06216 Cherry Street
+l: Alexandria
+st: AZ
+postalCode: 11839
+postalAddress: Abahri Abazari$06216 Cherry Street$Alexandria, AZ  11839
+description: This is the description for Abahri Abazari.
+
+dn: uid=user.9,ou=test
+objectClass: top
+objectClass: person
+objectClass: organizationalPerson
+objectClass: inetOrgPerson
+givenName: Abbas
+sn: Abbatantuono
+cn: Abbas Abbatantuono
+initials: AA
+uid: user.9
+mail: user.9@cs.hacettepe.edu.tr
+userPassword: password
+telephoneNumber: 211-567-4008
+homePhone: 243-266-3597
+pager: 898-692-6753
+mobile: 514-052-9820
+employeeNumber: 9
+street: 14859 Broadway Street
+l: Ottumwa
+st: MI
+postalCode: 83901
+postalAddress: Abbas Abbatantuono$14859 Broadway Street$Ottumwa, MI  83901
+description: This is the description for Abbas Abbatantuono.
+
+dn: uid=user.10,ou=test
+objectClass: top
+objectClass: person
+objectClass: organizationalPerson
+objectClass: inetOrgPerson
+givenName: Abbe
+sn: Abbate
+cn: Abbe Abbate
+initials: AA
+uid: user.10
+mail: user.10@cs.hacettepe.edu.tr
+userPassword: password
+telephoneNumber: 671-681-8894
+homePhone: 725-020-7851
+pager: 599-718-6535
+mobile: 546-782-8242
+employeeNumber: 10
+street: 16897 Fifteenth Street
+l: Cadillac
+st: NV
+postalCode: 96091
+postalAddress: Abbe Abbate$16897 Fifteenth Street$Cadillac, NV  96091
+description: This is the description for Abbe Abbate.
+

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java?rev=413909&r1=413908&r2=413909&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java
(original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmDirectoryPartition.java
Tue Jun 13 07:37:04 2006
@@ -147,7 +147,7 @@
             String path = workingDirectory.getPath() + File.separator + "master";
             BaseRecordManager base = new BaseRecordManager( path );
             base.disableTransactions();
-            recMan = new CacheRecordManager( base, new MRU( 100000 ) );
+            recMan = new CacheRecordManager( base, new MRU( 1000 ) );
         }
         catch ( IOException e )
         {

Modified: directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java?rev=413909&r1=413908&r2=413909&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
(original)
+++ directory/branches/apacheds/optimization/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
Tue Jun 13 07:37:04 2006
@@ -41,7 +41,7 @@
 import org.apache.directory.shared.ldap.util.SynchronizedLRUMap;
 
 
-/**
+/** 
  * A Jdbm based index implementation.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -85,7 +85,7 @@
     public JdbmIndex( AttributeType attribute, RecordManager recMan ) throws NamingException
     {
         this.attribute = attribute;
-        keyCache = new SynchronizedLRUMap( 1000000 );
+        keyCache = new SynchronizedLRUMap( 1000 );
         this.recMan = recMan;
         initTables();
     }



Mime
View raw message